3

我在 xamarin 表单中创建了一个应用程序,我在列表视图项模板的 ViewCell 中使用了上下文操作:

          <ViewCell.ContextActions>
            <MenuItem Clicked="OnEdit"
              Text="Edit"/>
            <MenuItem Clicked="OnDelete"
               Text="Delete" IsDestructive="True" />
          </ViewCell.ContextActions>

当我长按列表视图中的任何项目时,我会在操作栏中获得上下文操作项,如果我不点击上下文操作中的任何选项,它将不会在 android 中关闭。有什么方法可以让我通过 xamarin 表单中的代码关闭该上下文操作栏?

4

0 回答 0