mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-08 07:55:13 +00:00
New menu item implementation based directly on MenuItem/ToggleMenuFlyoutItem
This commit is contained in:
parent
11cd45c099
commit
e06dcc5155
12 changed files with 335 additions and 412 deletions
18
MapUiTools/WinUI/MapMenuItem.WinUI.cs
Normal file
18
MapUiTools/WinUI/MapMenuItem.WinUI.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#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 class MapMenuItem : ToggleMenuFlyoutItem
|
||||
{
|
||||
protected IEnumerable<MapMenuItem> ParentMenuItems
|
||||
=> (VisualTreeHelper.GetParent(this) as Panel)?.Children.OfType<MapMenuItem>();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue