mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
32 lines
739 B
C#
32 lines
739 B
C#
using System.Collections.Generic;
|
|
#if UWP
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Markup;
|
|
#elif WINUI
|
|
using Microsoft.UI.Xaml.Controls;
|
|
using Microsoft.UI.Xaml.Markup;
|
|
#endif
|
|
|
|
namespace MapControl.UiTools
|
|
{
|
|
[ContentProperty(Name = nameof(Items))]
|
|
public partial class MenuButton
|
|
{
|
|
public MenuButton()
|
|
{
|
|
Flyout = new MenuFlyout();
|
|
Loaded += async (s, e) => await Initialize();
|
|
}
|
|
|
|
public string Icon
|
|
{
|
|
get => (Content as FontIcon)?.Glyph;
|
|
set => Content = new FontIcon { Glyph = value };
|
|
}
|
|
|
|
public MenuFlyout Menu => (MenuFlyout)Flyout;
|
|
|
|
public IList<MenuFlyoutItemBase> Items => Menu.Items;
|
|
}
|
|
}
|