Skip to main content
A newer version of this page is available. .
All docs
V20.2

ConfirmationBehavior.MessageTitle Property

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

Namespace: DevExpress.Mvvm.UI

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core

Declaration

public string MessageTitle { get; set; }

Property Value

Type Default Description
String Confirmation

The confirmation message title.

Remarks

The following code sample attaches a ConfirmationBehavior to a button and sets a custom message title:

<UserControl ... 
    xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm">
    <UserControl.DataContext>
        <ViewModels:MainViewModel/>
    </UserControl.DataContext>
    <StackPanel>
        <Button Content="Close">
            <dxmvvm:Interaction.Behaviors>
               <dxmvvm:ConfirmationBehavior Command="{Binding CloseCommand}" MessageTitle="Unsaved changes"
               MessageText="The document has unsaved changes. Do you want to close the document?"/>
            </dxmvvm:Interaction.Behaviors>
        </Button>
    </StackPanel>
</UserControl>
using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;

public class MainViewModel : ViewModelBase {
    [Command]
    public void Close() {
        // ...
    }
}
See Also