Added Loaded handler

This commit is contained in:
ClemensFischer 2025-03-22 15:49:44 +01:00
parent 388e446b96
commit c54a0cf91f
2 changed files with 16 additions and 0 deletions

View file

@ -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)

View file

@ -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)