Xamarin形成ListView Capture双击和上下文操作

时间:2017-05-17 21:44:34

标签: c# xamarin xamarin.forms

我有一个有趣的问题我想在我的列表视图中添加双击事件我唯一的工作方式就是我向我的数据模板添加了一个手势viewcell stacklayout

                     <StackLayout.GestureRecognizers>
                        <TapGestureRecognizer Command="{Binding 
                         BindingContext.GetItemDetailCommand,  Source=
                         {x:Reference Name=page}}" CommandParameter="{Binding .}"
                          NumberOfTapsRequired="2"/>
                      </StackLayout.GestureRecognizers>

然后我丢失了上下文操作

                 <ViewCell.ContextActions>
                                    <MenuItem Text="Delete"  Command="{Binding BindingContext.DeleteCommand,  Source={x:Reference Name=page}}"      
                             CommandParameter="{Binding .}"/>
                            </ViewCell.ContextActions>

所以我添加到我的堆栈面板InputTransparent="True",所以事件应该冒泡然后上下文操作再次开始工作但我失去了双击:(

0 个答案:

没有答案