I have set the binding source of "IsVisible" property to a public variable in the code behind without following MVVM. In this case, even though the state of the variable is changed, the view (in this case ListView) is still visible.
private void btnNotifications_Clicked(object sender, EventArgs e)
{
if (!ActivateControlButton(sender as Button))
{
Remove_ChildElements_InUserCOntrol();
return;
}
Is_MainTaskList_Visible = false;
}
My xml code is:
<ListView x:Name="lstUserTasks"
Grid.Row="2"
ItemsSource="{Binding User_Task_Groups}"
IsGroupingEnabled="True"
FlowDirection="LeftToRight"
HasUnevenRows="True"
ItemSelected="lstUserTasks_ItemSelected"
ItemTapped="lstUserTasks_ItemTapped"
IsVisible="{Binding Is_MainTaskList_Visible}">
Can someone help?
How to notify the UI thread that this propery is changed?
Is_MainTaskList_Visible
a public property? Does the class implementINotifyPropertyChanged
? – Jason