Example #1
0
        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();
        }
Example #2
0
        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();
        }
Example #3
0
        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;
            }
        }