private async void OnOkClicked(object sender, EventArgs e) { await message.RequestCloseAsync(); bnt = null; txt = null; messageGrid = null; message = null; }
private async void ShowDialogOutside(object sender, RoutedEventArgs e) { var dialog = new CustomDialog(this.MetroDialogOptions) { Content = this.Resources["CustomDialogTest"], Title = "This dialog allows arbitrary content." }; dialog = dialog.ShowDialogExternally(); await Task.Delay(5000); await dialog.RequestCloseAsync(); }