Forum Xamarin.Forms

Using ListView with ItemsSource and ItemTemplate, how to have items with different ContextActions ?

JohnHardmanJohnHardman GBUniversity mod

Apologies if I'm being dim, but when using a ListView with ItemsSource and ItemTemplate, if I want different items in the list to have different combinations of ContextActions, how would I do this? I currently have the same set of ContextActions on every item, but want to be able to have different sets depending on what the item is.

(I normally use C# rather than XAML, but either should point me in the right direction)

Best Answer


  • JohnHardmanJohnHardman GBUniversity mod

    @GeraldVersluis - Many thanks. I thought I was just too tired to think straight :-)

    After previous experiences, I'll wait for 2.1 to be marked as stable. In the meantime, I'll do the check when the user attempts to use the context action.

    Thanks again.

  • JohnHardmanJohnHardman GBUniversity mod

    And it's already possible to use CanExecute with ContextActions. It's not the same as actually having different sets of actions visible, but at least it can be used to show which are executable and which are not.

Sign In or Register to comment.