Skip to main content
A newer version of this page is available. .

ThemedWindow.ShowDialog(IEnumerable<UICommand>) Method

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

Namespace: DevExpress.Xpf.Core

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

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:

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.OK, Caption = "Apply", Placement = Dock.Left });
buttons.Add(new UICommand() { Id = MessageBoxResult.Cancel, Caption = "Dismiss", Placement = Dock.Left });

UICommand result = themedWindow.ShowDialog(buttons);
See Also