private async void FullDescriptionViewModel_VisualStateChanged(object sender, ChangeVisualStateEventArgs e) { switch (e.LoadingStatesEnum) { case LoadingStatesEnum.None: break; case LoadingStatesEnum.LoadingState: { await _statusBar.ProgressIndicator.ShowAsync(); break; } case LoadingStatesEnum.LoadedState: { await _statusBar.ProgressIndicator.HideAsync(); break; } case LoadingStatesEnum.ErrorState: { _statusBar.ProgressIndicator.Text = FullDescriptionViewModel.InfoMessage; _statusBar.ProgressIndicator.ProgressValue = null; await _statusBar.ProgressIndicator.ShowAsync(); break; } case LoadingStatesEnum.NotFoundState: { _statusBar.ProgressIndicator.Text = FullDescriptionViewModel.InfoMessage; _statusBar.ProgressIndicator.ProgressValue = null; await _statusBar.ProgressIndicator.ShowAsync(); break; } default: throw new ArgumentOutOfRangeException(); } }
protected virtual void OnVisualStateChanged(ChangeVisualStateEventArgs e) { VisualStateChanged?.Invoke(this, e); }