private void SetVisibility() { IsVisible = new MainPageVisibility() { Label = VisibleUsers.Count == 0 && AllUsers.Count != 0, ListView = VisibleUsers.Count != 0, SomethingWentWrong = AllUsers.Count == 0, ActivityIndicator = false }; }
public MainPageViewModel(INavigationService navigationService) : base(navigationService) { Title = "Strona główna"; _navigationService = navigationService; restService = new RestService(); SearchCommand = new DelegateCommand <string>(Search); TextChangeInSearchCommand = new DelegateCommand(TextChangeInSearch); UserTappedCommand = new DelegateCommand <User>(UserTapped); IsVisible = new MainPageVisibility() { ActivityIndicator = true, ListView = true, SomethingWentWrong = false, Label = false }; FillAllUsers(); }