[Windows] Correct enter/esc keypress behaviors for MessageDialog (#292)
authorPaul DiPietro <pauldipietro@users.noreply.github.com>
Tue, 16 Aug 2016 18:33:11 +0000 (13:33 -0500)
committerJason Smith <jason.smith@xamarin.com>
Tue, 16 Aug 2016 18:33:11 +0000 (11:33 -0700)
Xamarin.Forms.Platform.WinRT/Platform.cs

index 99e51e4..a0b1ca5 100644 (file)
@@ -738,13 +738,13 @@ namespace Xamarin.Forms.Platform.WinRT
                        if (options.Accept != null)
                        {
                                dialog.Commands.Add(new UICommand(options.Accept));
-                               dialog.DefaultCommandIndex = (uint)dialog.Commands.Count - 1;
+                               dialog.DefaultCommandIndex = 0;
                        }
 
                        if (options.Cancel != null)
                        {
                                dialog.Commands.Add(new UICommand(options.Cancel));
-                               dialog.CancelCommandIndex = 0;
+                               dialog.CancelCommandIndex = (uint)dialog.Commands.Count - 1;
                        }
 
                        IUICommand command = await dialog.ShowAsync();