Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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