mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Fixed menu button selection
This commit is contained in:
parent
be0e06f581
commit
9a26fdaefc
2 changed files with 22 additions and 3 deletions
|
|
@ -36,6 +36,8 @@ namespace MapControl.UiTools
|
|||
#endif
|
||||
public class MapLayersMenuButton : MenuButton
|
||||
{
|
||||
private UIElement selectedLayer;
|
||||
|
||||
public MapLayersMenuButton()
|
||||
: base("\uE81E")
|
||||
{
|
||||
|
|
@ -108,7 +110,11 @@ namespace MapControl.UiTools
|
|||
|
||||
private void SetMapLayer(UIElement layer)
|
||||
{
|
||||
Map.MapLayer = layer;
|
||||
if (selectedLayer != layer)
|
||||
{
|
||||
selectedLayer = layer;
|
||||
Map.MapLayer = selectedLayer;
|
||||
}
|
||||
|
||||
UpdateCheckedStates();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue