ThemedWindowDialogButton.DialogResult Property
Gets or sets the dialog’s result when the UICommand is not specified.
Namespace: DevExpress.Xpf.Core
Assembly: DevExpress.Xpf.Core.v20.2.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
MessageBoxResult | The dialog result value. |
Remarks
The following code sample shows how to add the OK and Cancel dialog buttons to the ThemedWindow in code:
ThemedWindow themedWindow = new ThemedWindow() { Title = "Your update is ready" };
themedWindow.Content = new TextBlock() { Text = "Do you want to update now?" };
ThemedWindowDialogButton CancelDialogButton = new ThemedWindowDialogButton() { Content = "Don't Remind Me", IsCancel = true, DialogResult = MessageBoxResult.Cancel };
themedWindow.DialogButtons.Add(CancelDialogButton);
ThemedWindowDialogButton OKDialogButton = new ThemedWindowDialogButton() { Content = "Install Update", IsDefault = true, DialogResult = MessageBoxResult.OK };
themedWindow.DialogButtons.Add(OKDialogButton);
ThemedWindowDialogButton DismissDialogButton = new ThemedWindowDialogButton() { Content = "Remind Me Tomorrow", DialogResult = MessageBoxResult.No, Placement = Dock.Left };
themedWindow.DialogButtons.Add(DismissDialogButton);
themedWindow.ShowDialog();
See Also