mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 15:05:50 +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/WPF/MapMenuItem.WPF.cs
Normal file
18
MapUiTools/WPF/MapMenuItem.WPF.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MapControl.UiTools
|
||||
{
|
||||
public class MapMenuItem : MenuItem
|
||||
{
|
||||
public string Text
|
||||
{
|
||||
get => Header as string;
|
||||
set => Header = value;
|
||||
}
|
||||
|
||||
protected IEnumerable<MapMenuItem> ParentMenuItems
|
||||
=> (Parent as ItemsControl)?.Items.OfType<MapMenuItem>();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue