Snt.Lib.Wpf.Notifications.WpfUi 0.4.3
Snt.Lib.Wpf.Notifications.WpfUi
WPF-UI InfoBar-based notification templates for Snt.Lib.Wpf.NotificationHost. Drop in WpfUiNotificationHost and it provides styled templates out of the box.
Installation
dotnet add package Snt.Lib.Wpf.Notifications.WpfUi
Prerequisite: This package depends on
Snt.Lib.Wpf(pulled in automatically) and WPF-UI. Your app must apply a WPF-UI theme.
XAML namespace
xmlns:stn="clr-namespace:Snt.Lib.Wpf.Notifications.WpfUi;assembly=Snt.Lib.Wpf.Notifications.WpfUi"
Quick start
Use WpfUiNotificationHost as a drop-in replacement for NotificationHost:
<stn:WpfUiNotificationHost Service="{Binding NotificationService}" />
Customisation
WpfUiNotificationHost carries its templates in the control theme, so there are no public ResourceDictionary keys to merge manually. If you need to customise the visuals, either:
- use
WpfUiNotificationHostdirectly and override its control template in your app, or - use the base
NotificationHostand supply your ownNotificationTemplate,AcknowledgeableTemplate, andProgressTemplate.
Severity mapping
NotificationSeverity values are automatically mapped to WPF-UI InfoBarSeverity via the included NotificationSeverityToInfoBarSeverityConverter:
If you need the converter directly in XAML, import clr-namespace:Snt.Lib.Wpf.Notifications.WpfUi.Converters;assembly=Snt.Lib.Wpf.Notifications.WpfUi.
| NotificationSeverity | InfoBarSeverity |
|---|---|
Informational |
Informational |
Success |
Success |
Warning |
Warning |
Error |
Error |
No packages depend on Snt.Lib.Wpf.Notifications.WpfUi.
.NET 10.0
- Snt.Lib.Wpf (>= 0.4.3)
- WPF-UI (>= 4.2.0)