[英]How to fire an event when click on a shape file(within a boundary)?
Hi I am working on a Xamarin project, and I need to create a floor map with navigation. 嗨,我正在Xamarin项目上,我需要创建带有导航的楼层地图。 I have created the map as a shape file and also need to pop the information about meeting rooms when the user slick on the room(location boundary). 我已将地图创建为形状文件,并且还需要在用户在会议室(位置边界)上滑动时弹出有关会议室的信息。 So how to fire the event when click on it? 那么,如何在单击事件时触发该事件?
How can I do it using Xamarin forms? 如何使用Xamarin表单来做? if not any other way to do it? 如果没有其他方法可以做到?
var model = GetDataSource(); ShapeFileLayer layer=new ShapeFileLayer(); layer.ItemsSource=model; SelectedItemButton.Clicked += (sender, e) => { layer.SelectedItems.Add(model[0]); }; RemoveItemButton.Clicked += (sender, e) => { layer.SelectedItems.Remove(model[0]); };
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.