diff options
author | Vsevolod Kukol <sevoku@microsoft.com> | 2016-09-20 01:33:31 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@microsoft.com> | 2016-09-20 01:33:31 +0300 |
commit | dbac8c7b800a86c1ef9af7c31c101b9123a64a3e (patch) | |
tree | 981529cc1b85485b4778874395f286e547510f67 /TestApps | |
parent | 61e27e08130f495ab2118730c61b2008aa88f593 (diff) |
Add Dialog.DefaultCommand property
The DefaultCommand property sets a command to
be the default button of the dialog. Depending
on the platform the button will be added at the
end of the button list and/or have a different
appearance.
Diffstat (limited to 'TestApps')
-rw-r--r-- | TestApps/Samples/Samples/Windows.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/TestApps/Samples/Samples/Windows.cs b/TestApps/Samples/Samples/Windows.cs index dc236ae4..765faab4 100644 --- a/TestApps/Samples/Samples/Windows.cs +++ b/TestApps/Samples/Samples/Windows.cs @@ -74,6 +74,8 @@ namespace Samples d.Buttons.Add (new DialogButton (Command.Cancel)); d.Buttons.Add (new DialogButton (Command.Ok)); + d.DefaultCommand = custom; + d.CommandActivated += (sender, e) => { if (e.Command == custom) { e.Handled = !MessageDialog.Confirm ("Really close?", Command.Close); |