SideContextMenuView: auto close when tapped
nielscup opened this issue · 4 comments
nielscup commented
How do I auto close the context menu after tapping a context menu item? In the example it remains open when tapped which is not desired.
AndreiMisiukevich commented
Hi, you should call ForceClose or ForceCloseCommand
AndreiMisiukevich commented
e.g.
SideContextMenuView?.LastOpenedView?.ForceClose();
nielscup commented
Thanks for your quick response!! How do I reference the SideContextMenuView? Via the TapGesture?
AndreiMisiukevich commented
<SideContextMenuView x:Name="context" />
<TapGestureRecognizer Command="{Binding ForceCloseCommand, Source={x:Reference context}}"
Smth like this