Map menus

This commit is contained in:
ClemensFischer 2025-03-22 17:08:43 +01:00
parent c54a0cf91f
commit f1fa37a9a5
10 changed files with 153 additions and 15 deletions

View file

@ -1,5 +1,6 @@
using MapControl;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
namespace SampleApplication
@ -15,12 +16,14 @@ namespace SampleApplication
public LocationCollection Locations { get; set; }
}
public class MapViewModel
public class MapViewModel : INotifyPropertyChanged
{
public List<PointItem> Points { get; } = new List<PointItem>();
public List<PointItem> Pushpins { get; } = new List<PointItem>();
public List<PolylineItem> Polylines { get; } = new List<PolylineItem>();
public event PropertyChangedEventHandler PropertyChanged;
private PointItem selectedPushpin;
public PointItem SelectedPushpin
@ -29,6 +32,7 @@ namespace SampleApplication
set
{
selectedPushpin = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(SelectedPushpin)));
Debug.WriteLine("SelectedPushpin: " + (selectedPushpin?.Name ?? "None"));
}
}