mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
File scoped namespaces
This commit is contained in:
parent
c14377f976
commit
65aba44af6
152 changed files with 11962 additions and 12115 deletions
|
|
@ -2,32 +2,31 @@
|
|||
using System.Windows.Controls;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace MapControl.UiTools
|
||||
namespace MapControl.UiTools;
|
||||
|
||||
[ContentProperty(nameof(Items))]
|
||||
public partial class MenuButton
|
||||
{
|
||||
[ContentProperty(nameof(Items))]
|
||||
public partial class MenuButton
|
||||
static MenuButton()
|
||||
{
|
||||
static MenuButton()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(MenuButton), new FrameworkPropertyMetadata(typeof(MenuButton)));
|
||||
}
|
||||
|
||||
public MenuButton()
|
||||
{
|
||||
ContextMenu = new ContextMenu();
|
||||
DataContextChanged += (_, e) => ContextMenu.DataContext = e.NewValue;
|
||||
Loaded += async (_, _) => await Initialize();
|
||||
Click += (_, _) => ContextMenu.IsOpen = true;
|
||||
}
|
||||
|
||||
public string Icon
|
||||
{
|
||||
get => Content as string;
|
||||
set => Content = value;
|
||||
}
|
||||
|
||||
public ContextMenu Menu => ContextMenu;
|
||||
|
||||
public ItemCollection Items => ContextMenu.Items;
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(MenuButton), new FrameworkPropertyMetadata(typeof(MenuButton)));
|
||||
}
|
||||
|
||||
public MenuButton()
|
||||
{
|
||||
ContextMenu = new ContextMenu();
|
||||
DataContextChanged += (_, e) => ContextMenu.DataContext = e.NewValue;
|
||||
Loaded += async (_, _) => await Initialize();
|
||||
Click += (_, _) => ContextMenu.IsOpen = true;
|
||||
}
|
||||
|
||||
public string Icon
|
||||
{
|
||||
get => Content as string;
|
||||
set => Content = value;
|
||||
}
|
||||
|
||||
public ContextMenu Menu => ContextMenu;
|
||||
|
||||
public ItemCollection Items => ContextMenu.Items;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue