Windows Phone 8.1 WinRT map control Release Handlers

巧了我就是萌 提交于 2020-01-16 12:10:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!