protected async override void ShowOutcomeText(OutcomeTextViewModel text) { try { var dialog = new ContentDialog() { Content = new OuputText() { BindingContext = text, } }; dialog.AddButton(new ContentDialogButton() { Icon = Icons.TimesCircleRegular, Color = Color.White, Result = AddEditItemResult.Cancel, IsBack = true, }); dialog.Show(); await dialog.Wait(); await Navigation.PopModalAsync(); } catch (Exception e) { HandleError(e); } }
private void ShowContentDialog2Button_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e) { ContentDialog.Show("ContentDialog", "This is a ContentDialog. Another one will be queued up if you wait one second before clicking OK."); Timer timer = new Timer(1000); timer.Elapsed += (sneder, args) => { if (ContentDialog.IsShowingDialog) { ContentDialog.Show("ContentDialog", "This is another basic ContentDialog."); } timer.Stop(); }; timer.Start(); }
private void ShowContentDialogButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e) { ContentDialog.Show("ContentDialog", "This is a ContentDialog."); }