A newer version of this page is available. Switch to the current version.

ThemedWindow.ShowDialog(IEnumerable<UICommand>) Method

Displays the ThemedWindowDialog. A result returned when the window is closed.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v20.2.dll


public UICommand ShowDialog(
    IEnumerable<UICommand> dialogButtons = null

Optional Parameters

Name Type Default Description
dialogButtons IEnumerable<UICommand>


A UICommand collection.


Type Description

A clicked button’s UICommand value.


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