Skip to main content
All docs
V24.1

NotificationService.CreatePredefinedNotification(String, String, String, ImageSource, String) Method

Creates and returns a predefined notification with the specified header and body text and image.

Namespace: DevExpress.Mvvm.UI

Assembly: DevExpress.Xpf.Core.v24.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public INotification CreatePredefinedNotification(
    string text1,
    string text2,
    string text3,
    ImageSource image = null,
    string id = null
)

Parameters

Name Type Description
text1 String

The notification header.

text2 String

The notification’s body text1.

text3 String

The notification’s body text2.

Optional Parameters

Name Type Default Description
image ImageSource null

The notification image.

id String null

The notification identifier.

Returns

Type Description
DevExpress.Mvvm.INotification

An DevExpress.Mvvm.INotification descendant with the specified header, body text, and image.

Remarks

Structurally, the notification is represented by two main areas: Content and Image.

PredefinedNotification_Structure

The Content area layout depends on the template specified in the NotificationService.PredefinedNotificationTemplate property.

When multiple native Windows notifications are displayed simultaneously, the optional Id parameter of the CreatePredefinedNotification method allows the service to identify a specific notification that the user interacts with. NotificationActivator passes the Id value to the arguments parameter of the OnActivate method.

See Also