mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
24 lines
556 B
C#
24 lines
556 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Controls;
|
|
|
|
namespace MapControl.UiTools
|
|
{
|
|
public partial class MapMenuItem : MenuItem
|
|
{
|
|
protected MapMenuItem()
|
|
{
|
|
Loaded += (s, e) => Initialize();
|
|
Click += (s, e) => Execute();
|
|
}
|
|
|
|
public string Text
|
|
{
|
|
get => Header as string;
|
|
set => Header = value;
|
|
}
|
|
|
|
protected IEnumerable<MapMenuItem> ParentMenuItems => ((ItemsControl)Parent).Items.OfType<MapMenuItem>();
|
|
}
|
|
}
|