问题
I want know when map control from toolbox, release for user drag or some similar gesture.
I try all handlers DragLeave , LostFocus etc but never run.
I use following code on Map_CenterChanged event handler. My app add pushpin center on app and every time center changed add another DraggablePin where follow center position everytime.
Map.CenterChanged += Map_CenterChanged;
if (Map.Children.Contains(firstpin))
Map.Children.Remove(firstpin);
Map.DesiredPitch = 0;
MapControl.SetLocation(DraggablePin, CenterGeoPoint());
MapControl.SetNormalizedAnchorPoint(DraggablePin, new Point(0.5, 0.5));
if (Map.Children.Count==0)
Map.Children.Add(DraggablePin);
else
Map.UpdateLayout();
I want messagedialog where Map_CenterChanged stopped run.
Please help !
来源:https://stackoverflow.com/questions/32652666/windows-phone-8-1-winrt-map-control-release-handlers