arvind baldaniya

arvind baldaniya

  • NA
  • 339
  • 140.8k

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)