Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/313.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/17.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# 在Xamarin窗体中单击多边形时如何显示弹出窗口_C#_Asp.net Mvc_Xamarin.forms_Polygon - Fatal编程技术网

C# 在Xamarin窗体中单击多边形时如何显示弹出窗口

C# 在Xamarin窗体中单击多边形时如何显示弹出窗口,c#,asp.net-mvc,xamarin.forms,polygon,C#,Asp.net Mvc,Xamarin.forms,Polygon,我正在使用WebAPI检索坐标并在地图上显示为多边形。 现在,我想在单击这些多边形以显示带有API更多信息的弹出窗口时创建这些多边形。 我的Xaml: 将手势识别器添加到视图中,并根据需要显示弹出窗口。可以向Xamarin表单中的任何视图添加手势 var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.Tapped += (s, e) => { // handle the tap to

我正在使用WebAPI检索坐标并在地图上显示为多边形。 现在,我想在单击这些多边形以显示带有API更多信息的弹出窗口时创建这些多边形。 我的Xaml:


将手势识别器添加到视图中,并根据需要显示弹出窗口。可以向Xamarin表单中的任何视图添加手势

var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (s, e) => {
    // handle the tap to display the popup here
};
[YourView].GestureRecognizers.Add(tapGestureRecognizer);
如果要显示一个简单的警报对话框,则可以使用Xamarin表单中的来实现该结果。有关更多详细信息,请参阅

如果您希望根据您的UI需求显示定制的弹出窗口,那么有一个优秀的开源插件()可供使用。你可以下载。它也有各种各样的例子供你实现你想要的


我希望这对你有帮助

将手势识别器添加到视图中,并根据需要显示弹出窗口。可以向Xamarin表单中的任何视图添加手势

var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (s, e) => {
    // handle the tap to display the popup here
};
[YourView].GestureRecognizers.Add(tapGestureRecognizer);
如果要显示一个简单的警报对话框,则可以使用Xamarin表单中的来实现该结果。有关更多详细信息,请参阅

如果您希望根据您的UI需求显示定制的弹出窗口,那么有一个优秀的开源插件()可供使用。你可以下载。它也有各种各样的例子供你实现你想要的

我希望这对你有帮助

var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (s, e) => {
    // handle the tap to display the popup here
};
[YourView].GestureRecognizers.Add(tapGestureRecognizer);