/// <summary> /// Initializes a new instance of the <see cref="GeoMap"/> class. /// </summary> public GeoMap() { Child = WpfBase; WpfBase.LandClick += (o, point) => { if (LandClick != null) { LandClick.Invoke(o, point); } }; }
private void POnMouseDown(object sender, MouseButtonEventArgs mouseButtonEventArgs) { var land = Lands.Values.FirstOrDefault(x => x.Shape == sender); if (land == null) { return; } if (LandClick != null) { LandClick.Invoke(sender, land); } }
/// <summary> /// Initializes a new instance of the <see cref="GeoMap"/> class. /// </summary> public GeoMap() { Child = WpfBase; //workaround for windows 7 focus issue //https://github.com/beto-rodriguez/Live-Charts/issues/515 HostContainer.MouseEnter += (sender, args) => { Focus(); }; WpfBase.LandClick += (o, point) => { if (LandClick != null) { LandClick.Invoke(o, point); } }; }