Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public UICommand ShowDialog(
    IEnumerable<UICommand> dialogButtons = null
)

#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