Skip to main content
All docs

ConfirmationBehavior.MessageButton Property

Gets or sets the confirmation message buttons. This is a dependency property.

Namespace: DevExpress.Mvvm.UI

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

NuGet Package: DevExpress.Wpf.Core


public MessageBoxButton MessageButton { get; set; }

Property Value

Type Default Description
MessageBoxButton @System.Windows.MessageBoxButton.YesNo

Confirmation message buttons.


The following code enables the Yes, No, and Cancel buttons in the confirmation message:

<Button Content="Close">
        <dxmvvm:ConfirmationBehavior EnableConfirmationMessage="{Binding IsSaved, Converter={StaticResource BooleanNegationConverter}}" 
                                     Command="{Binding CloseCommand}" MessageText="The document has unsaved changes. Do you want to close the document?"/>
using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;
// ...
    public class MainViewModel : ViewModelBase {
    // ...
        public void Close() {
        // ...
See Also