Forums - C# Corner

Forum guidelines
arvind baldaniya

arvind baldaniya

  • 1.4k
  • 157
  • 13.3k

label Hide and show using xaml and mvvvm

Apr 8 2017 9:15 AM
How to Lable Hide and show if admin is login then one label is displayed otherwise label is hidden {How Solve it} ?
xaml Code
<StackLayout IsVisible="{Binding IsAdminTrue}"> 
<Label Text="is_professional"></Label> </StackLayout>
ViewModel Code
public void IsProfessional()
{ if (CurrentUser.IsAdmin!= true) { IsAdminTrue= false; } 
else { IsAdminTrue= true; } }


Answers (2)