private async Task Button1CommandAction() { var dialog = new CustomMessageDialog { Title = this.Title, Message = this.Message, Button1Text = "Click Me Arial", FontFamily = new FontFamily("Arial"), FontWeight = FontWeights.Black }; await dialog.ShowAsync(); }
private async Task Button2CommandAction() { var dialog = new CustomMessageDialog { Title = this.Title, Message = this.Message, ButtonBorderBrush = new SolidColorBrush().FromHex("#14f5a9"), ButtonForeground = new SolidColorBrush().FromHex("#babaca"), Button1Text = "Click Me", Button2Text = "Or Me!", FontFamily = new FontFamily("Arial") }; await dialog.ShowAsync(); }
public async Task ShowAsync(string message, string title, params UICommand[] dialogCommands) { // Only show one dialog at a time. if (!IsShowing) { var messageDialog = new CustomMessageDialog(message, title); if (dialogCommands != null) { var commands = dialogCommands; foreach (var command in commands) { messageDialog.Commands.Add(command); } } IsShowing = true; await messageDialog.ShowAsync(); IsShowing = false; } }