ThemedWindow.ShowDialog(IEnumerable<UICommand>) Method
Displays the ThemedWindowDialog. A result returned when the window is closed.
Namespace: DevExpress.Xpf.Core
Assembly: DevExpress.Xpf.Core.v24.1.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
dialogButtons | IEnumerable<UICommand> | null | A UICommand collection. |
Returns
Type | Description |
---|---|
UICommand | A clicked button’s UICommand value. |
Remarks
The following code snippet shows how to display the ThemedWindow with a UICommand list and check the pressed button:
ThemedWindow themedWindow = new ThemedWindow() { Title = "ThemedWindowDialog" };
List<UICommand> buttons = new List<UICommand>();
buttons.Add(new UICommand() { Id = MessageBoxResult.Cancel, Caption = "Custom_Cancel", IsCancel = true });
buttons.Add(new UICommand() { Id = MessageBoxResult.OK, Caption = "Custom_Ok", IsDefault = true });
buttons.Add(new UICommand() { Id = MessageBoxResult.Yes, Caption = "Apply", Placement = Dock.Left });
buttons.Add(new UICommand() { Id = MessageBoxResult.No, Caption = "Dismiss", Placement = Dock.Left });
UICommand result = themedWindow.ShowDialog(buttons);
ThemedMessageBox.Show("Done", String.Format("'{0}' dialogButton has been pressed", result.Id.ToString()), MessageBoxButton.OK);
See Also