Back to Devexpress

NotificationService.PredefinedNotificationTemplate Property

wpf-devexpress-dot-mvvm-dot-ui-dot-notificationservice-4ba398e9.md

latest4.8 KB
Original Source

NotificationService.PredefinedNotificationTemplate Property

Gets or sets the template that defines the presentation of predefined notifications. This is a dependency property.

Namespace : DevExpress.Mvvm.UI

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public NotificationTemplate PredefinedNotificationTemplate { get; set; }
vb
Public Property PredefinedNotificationTemplate As NotificationTemplate

Property Value

TypeDescription
DevExpress.Mvvm.UI.NotificationTemplate

An object specifing the presentation of predefined notifications.

|

Remarks

This property allows you to apply one of the following built-in templates to predefined notifications in your application.

NameAppearanceDescription
LongTextAccepts a value of the first parameter ( text1 ) of the INotificationService.CreatePredefinedNotification method and displays it across all lines.
ShortHeaderAndLongTextAccepts values of the first and second parameters ( text1 and text2 ) of the INotificationService.CreatePredefinedNotification method and displays the first value across the first line and the second one across the second and third lines.
LongHeaderAndShortTextAccepts values of the first and second parameters ( text1 and text2 ) of the INotificationService.CreatePredefinedNotification method and displays the first value across the first and second lines and the second one across the third line.
ShortHeaderAndTwoTextFieldsAccepts values of the first, second and third parameters ( text1 , text2 , text3 ) of the INotificationService.CreatePredefinedNotification method and displays them across the first, second and third lines respectively.

Note

The last parameter of the INotificationService.CreatePredefinedNotification method responsible for the notification’s image ( image ) is accepted by all templates.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PredefinedNotificationTemplate property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-notificationservice-create-interactive-notifications/CS/InteractiveNotifications/MainWindow.xaml#L15

xml
<dxmvvm:Interaction.Behaviors>
    <dxmvvm:NotificationService PredefinedNotificationTemplate="LongText"
                                UseWin8NotificationsIfAvailable="True"

See Also

NotificationService Class

NotificationService Members

DevExpress.Mvvm.UI Namespace