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

ThemedWindow.DialogButtons Property

Gets the custom dialog button collection. This is a dependency property.

Namespace: DevExpress.Xpf.Core

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


public ObservableCollection<object> DialogButtons { get; }

Property Value

Type Description

A dialog button collection.


Create a ThemedWindowDialogButton object and add it to the DialogButtons collection to display a custom button.

You should specify the dialog button’s DialogResult property.

The following code sample shows how to add the OK and Cancel 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 DismissDialogButton = new ThemedWindowDialogButton() { Content = "Remind Me Tomorrow", DialogResult = MessageBoxResult.No, Placement = Dock.Left };

MessageBoxResult result = themedWindow.ShowDialog(MessageBoxButton.OKCancel);

ThemedMessageBox.Show("Done", String.Format("'{0}' dialogButton has been pressed", result.ToString()), MessageBoxButton.OK);

The image below illustrates the result:

DialogButton - How to check the MessageBoxResult

The following code sample shows how to add the same buttons to the ThemedWindow in XAML:

    <dx:ThemedWindowDialogButton Content="Remind Me Tomorrow" Placement="Left" DialogResult="No"/>
  <dx:ThemedWindowDialogButton DialogResult="OK" Content="OK" IsDefault="True"/>
  <dx:ThemedWindowDialogButton DialogResult="Cancel" Content="Cancel"/>
See Also