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

WinUIMessageBoxService

  • 2 minutes to read

The WinUIMessageBoxService implements the IMessageBoxService interface and uses the WinUIMessageBox control to display messages.

WinUIMessageBox

Note

The message box stretches to fit the window’s width when you use the WinUIMessageBoxService.

Example

You can use the WinUIMessageBoxService instead of the DXMessageBoxService. The following example demonstrates how to use the WinUIMessageBoxService:

Imports DevExpress.Mvvm
Imports System.Windows.Input

Namespace Example.ViewModel
    Public Class MainViewModel
        Protected Overridable ReadOnly Property MessageBoxService() As IMessageBoxService
            Get
                Return Nothing
            End Get
        End Property
        Public Sub ShowMessage()
            MessageBoxService.Show("This is MainView!")
        End Sub
    End Class
End Namespace