public TipoItensCardapioViewModel(INavigationService navigationService) : base(navigationService) { _service = new TipoItemCardapioService(); ListaItensCardapio = new ObservableCollection <TipoItemCardapio>(_service.Listar()); Title = "Cardápio"; CanNavigate = true; }
public async override void OnNavigatingTo(NavigationParameters parameters) { if (parameters != null && parameters.ContainsKey("reload")) { IsCarregando = true; await Task.Run(() => { ListaItensCardapio = new ObservableCollection <TipoItemCardapio>(_service.Listar()); }); IsCarregando = false; } }