I am new to Xamarin Forms and MVMM. And i need hide and unhide the label on runtime using MVMM concept. I am create the binding property and bound into it. But It not worked.
My Xaml code is:
< Label Text="The Error" IsVisible="{Binding IsVisible}"/>
And My ViewModel Code is :
private bool isvisible;
public event PropertyChangedEventHandler OnPropertyChanged;
public void PropertyChanged([CallerMemberName] string propertyName = "")
{
this.OnPropertyChanged?.Invoke(this, new
PropertyChangedEventArgs(propertyName));
}
public bool IsVisible
{
get
{
return isvisible;
}
set
{
isvisible = value;
PropertyChanged();
}
}
Once i set isvisible property into true the label is unhided. How to achieve that?
And what wrong i done with this...