Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Windows Phone 8.1 WinRT映射控件发布处理程序_C#_Windows_Windows Runtime_Windows Phone 8.1 - Fatal编程技术网

C# Windows Phone 8.1 WinRT映射控件发布处理程序

C# Windows Phone 8.1 WinRT映射控件发布处理程序,c#,windows,windows-runtime,windows-phone-8.1,C#,Windows,Windows Runtime,Windows Phone 8.1,我想知道当地图控件从工具箱中释放出来,供用户拖动或做一些类似的手势 我尝试了所有的处理程序DragLeave、LostFocus等,但从未运行过 我在Map_CenterChanged事件处理程序上使用以下代码。我的应用程序在应用程序上添加图钉中心,每次更改中心时,在每次跟随中心位置的位置添加另一个图钉 Map.CenterChanged+=地图\u CenterChanged if (Map.Children.Contains(firstpin)) Ma

我想知道当地图控件从工具箱中释放出来,供用户拖动或做一些类似的手势

我尝试了所有的处理程序DragLeave、LostFocus等,但从未运行过

我在Map_CenterChanged事件处理程序上使用以下代码。我的应用程序在应用程序上添加图钉中心,每次更改中心时,在每次跟随中心位置的位置添加另一个图钉

Map.CenterChanged+=地图\u 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();
我想要messagedialog,其中Map\u Center已停止运行


请帮忙

尽量对你的问题做一个小样本,并将其包含在这里,否则问题就太开放了。谢谢,我编辑了我的答案