简体   繁体   English

单击形状文件(在边界内)时如何触发事件?

[英]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.

相关问题 如何在WPF的上下文菜单中正确触发click事件 - How to properly fire the click event in a contextmenu in WPF 如何触发ListView行单击上的事件? - How to fire an event on ListView row click? 带有形状的画布 - 当我点击形状时,MouseUp事件会同时触发它们 - Canvas with shape on it - MouseUp events fire on both of them when I click shape 在混音器中播放文件结束时触发事件 - Fire event when playback of file ended in mixer 即使在C#中单击用户控件,如何触发表单单击事件 - How to fire form click event even when clicking on user controls in c# 当在c#winform中按下PageDown键时,如何触发Button Click事件 - How can I fire a Button Click event when PageDown key pressed in c# winform 当基于具有焦点的文本框按下Enter键时,如何触发Button Click事件? - How can I fire a Button Click event when Enter Key is pressed based on what textbox has focus? 当清单中的T属性发生变化时,如何实现和触发事件 <T> 在所属类中 - How to implement and fire an event when a change occurs in a property of `T` in `List<T>` within the owning class 什么时候在目录内触发FileSystemWatcher.Created事件? - When does a FileSystemWatcher.Created event fire within a directory? 如何使RowCreated事件在不回发时不触发 - How to make RowCreated event not to fire when it is not postback
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM