mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Added Loaded handler
This commit is contained in:
parent
388e446b96
commit
c54a0cf91f
|
|
@ -33,6 +33,14 @@ namespace MapControl.UiTools
|
|||
|
||||
public MapLayerMenuItem()
|
||||
{
|
||||
Loaded += (s, e) =>
|
||||
{
|
||||
if (DataContext is MapBase map)
|
||||
{
|
||||
IsChecked = map.Children.Contains(MapLayer);
|
||||
}
|
||||
};
|
||||
|
||||
Click += async (s, e) =>
|
||||
{
|
||||
if (DataContext is MapBase map)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,14 @@ namespace MapControl.UiTools
|
|||
|
||||
public MapProjectionMenuItem()
|
||||
{
|
||||
Loaded += (s, e) =>
|
||||
{
|
||||
if (DataContext is MapBase map)
|
||||
{
|
||||
IsChecked = map.MapProjection.CrsId == MapProjection;
|
||||
}
|
||||
};
|
||||
|
||||
Click += async (s, e) =>
|
||||
{
|
||||
if (DataContext is MapBase map)
|
||||
|
|
|
|||
Loading…
Reference in a new issue