mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 07:55:13 +00:00
Move Execute method to base class
This commit is contained in:
parent
a1b10b6e08
commit
45ab678d5b
6 changed files with 43 additions and 29 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
#if UWP
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
|
@ -10,9 +11,11 @@ using Microsoft.UI.Xaml.Media;
|
|||
|
||||
namespace MapControl.UiTools
|
||||
{
|
||||
public class MapMenuItem : ToggleMenuFlyoutItem
|
||||
public abstract class MapMenuItem : ToggleMenuFlyoutItem
|
||||
{
|
||||
public abstract Task<bool> Execute(MapBase map);
|
||||
|
||||
protected IEnumerable<MapMenuItem> ParentMenuItems
|
||||
=> (VisualTreeHelper.GetParent(this) as Panel)?.Children.OfType<MapMenuItem>();
|
||||
=> ((Panel)VisualTreeHelper.GetParent(this)).Children.OfType<MapMenuItem>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue