【发布时间】:2017-05-29 21:56:23
【问题描述】:
我想在 Picker 中添加一个点击手势——所以当一个值被选择(双击)时,我可以调用一个方法。我尝试了以下方法。但它永远不会着火!有什么想法吗?
<Picker Grid.Row="5" Margin="0,0,100,0" Title=" -Select State" SelectedIndex="{Binding StatesSelectedIndex, Mode=TwoWay}" ItemsSource="{Binding PPStates}" ItemDisplayBinding="{Binding Path=[display_name]}">
<Picker.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding OnTapPicker}"
NumberOfTapsRequired="1" />
</Picker.GestureRecognizers>
</Picker>
我已经厌倦了示例代码 https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/gestures/tap/
通过添加此Tapped="OnTapGestureRecognizerTapped"
【问题讨论】:
-
你的选择器有一些物品?
-
是的.. 50 个州
标签: xamarin