Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

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

JohnHardmanJohnHardman GBUniversity admin

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 admin

    @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 admin

    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.