Reputation: 53
I am trying display context actions menu items while selecting any listview item, there I have added three menu items. But I need to bind the visibility for those Menu Items. Depending on selection the specific menuitem should be visible. Is there any way to add binding for the contextActions menuitems in a listview?
Upvotes: 2
Views: 1122
Reputation: 34003
Since a ContextAction
is a MenuItem
this is not possible. The MenuItem
does not expose any (bindable) IsVisible
property or alike.
A hacky workaround could be to add/remove context actions whenever you determine what needs to be shown or hidden. Or use the IsEnabled
property that is available.
Upvotes: 2