Back to Devexpress

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

wpf-devexpress-dot-mvvm-dot-ui-dot-notificationservice-dot-createpredefinednotification-x28-system-dot-string-system-dot-string-system-dot-string-system-dot-object-system-dot-string-x29.md

latest2.9 KB
Original Source

NotificationService.CreatePredefinedNotification(String, String, String, Object, 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.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public INotification CreatePredefinedNotification(
    string text1,
    string text2,
    string text3,
    object image = null,
    string id = null
)
vb
Public Function CreatePredefinedNotification(
    text1 As String,
    text2 As String,
    text3 As String,
    image As Object = Nothing,
    id As String = Nothing
) As INotification

Parameters

NameTypeDescription
text1String

The notification header.

| | text2 | String |

The notification’s body text1.

| | text3 | String |

The notification’s body text2.

|

Optional Parameters

NameTypeDefaultDescription
imageObjectnull

The notification image.

| | id | String | null |

The notification identifier.

|

Returns

TypeDescription
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.

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

NotificationService Class

NotificationService Members

DevExpress.Mvvm.UI Namespace