mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
26 lines
653 B
C#
26 lines
653 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
#if UWP
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Media;
|
|
#else
|
|
using Microsoft.UI.Xaml.Controls;
|
|
using Microsoft.UI.Xaml.Media;
|
|
#endif
|
|
|
|
namespace MapControl.UiTools
|
|
{
|
|
public abstract class MapMenuItem : ToggleMenuFlyoutItem
|
|
{
|
|
protected MapMenuItem()
|
|
{
|
|
Loaded += (s, e) => ParentMenuItems = ((Panel)VisualTreeHelper.GetParent(this)).Children.OfType<MapMenuItem>().ToList();
|
|
}
|
|
|
|
public abstract Task Execute(MapBase map);
|
|
|
|
protected IList<MapMenuItem> ParentMenuItems { get; private set; }
|
|
}
|
|
}
|