小编Paw*_*icz的帖子

如何在UWP中创建MapIcon事件?

我想在我的MapControl中添加可以点击的图钉.由于Windows 8.1图钉类不再可用,UWP为我们提供了一个名为ImageIcon的东西(imo它有点蹩脚).这是我的代码:

BasicGeoposition bg = new BasicGeoposition() { Latitude = 52.280, Longitude = 20.972 };
Geopoint snPoint = new Geopoint(bg);
MapIcon mapIcon1 = new MapIcon();
mapIcon1.Location = snPoint;
mapIcon1.NormalizedAnchorPoint = new Point(0.5, 1.0);
MyMap.MapElements.Add(mapIcon1);
Run Code Online (Sandbox Code Playgroud)

如何进行事件处理(如点击或点击)?

先感谢您

c# maps xaml uwp

5
推荐指数
1
解决办法
1841
查看次数

标签 统计

c# ×1

maps ×1

uwp ×1

xaml ×1