mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 23:45:05 +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
|
|
@ -33,16 +33,11 @@ namespace MapControl.UiTools
|
|||
{
|
||||
DataContext = Map;
|
||||
|
||||
if (Items.Count > 0)
|
||||
if (Items.Count > 0 &&
|
||||
Items[0] is MapMenuItem item &&
|
||||
await item.Execute(Map))
|
||||
{
|
||||
if (Items[0] is MapLayerMenuItem mapLayerItem)
|
||||
{
|
||||
await mapLayerItem.Execute(Map);
|
||||
}
|
||||
else if (Items[0] is MapProjectionMenuItem mapProjectionItem)
|
||||
{
|
||||
mapProjectionItem.Execute(Map);
|
||||
}
|
||||
item.IsChecked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue