Is there any way to clear ListView's ContextActions by code?

I have a ListView created by XAML with some ContextActions and I wish clear it by code. Is it possible?
Thanks in advance.

Best Answer

Answers

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭✭

    Make your custom Cell with a property like ShowContextActions. Bind that property to some property in your ViewModel. In your Cell you can just do ContextActions.Clear() when ShowContextActions was set to false.

  • FersoftInformticaFersoftInformtica ESMember ✭✭

    Hello Michael:
    Thanks for your answer.
    But how I access to ContextActions from ListView object? I have accessible ListView by x:Name property but I don't know how access to ContextActions from code behind.

  • FersoftInformticaFersoftInformtica ESMember ✭✭

    Thanks Michael:
    I clear the ContextActions on BindingContextChange of ViewCell.

Sign In or Register to comment.