Hello,
I have a List View with that loads a custom DataTemplate. Everything works ok at loading: I am using a different ContentView for specific cells. My only problem is, when I want to change the xaml of the cell after pressing a button (after the cell is loaded).
Here is my command that does that (I have to add that it enters this method, I tested with a breackpoint):
//Commands initialisation
OnPlayButtonClicked = new Command (() => {
if (boolValue) {
this.View = new CustomCell1 ();
} else {
this.View = new CustomCell2 ();
}
});
P.S If I set the xaml before loading in OnBindingContextChanged, everything works but in the button action it doesn't change the view.
if (c.Value.Equals ("True")) {
this.View = new CustomCell1 ();
} else {
this.View = new CustomCell2 ();
}
Thank you.