WPF.Notifier
1.2.0
Install-Package WPF.Notifier -Version 1.2.0
dotnet add package WPF.Notifier --version 1.2.0
<PackageReference Include="WPF.Notifier" Version="1.2.0" />
paket add WPF.Notifier --version 1.2.0
#r "nuget: WPF.Notifier, 1.2.0"
// Install WPF.Notifier as a Cake Addin
#addin nuget:?package=WPF.Notifier&version=1.2.0
// Install WPF.Notifier as a Cake Tool
#tool nuget:?package=WPF.Notifier&version=1.2.0
WPF.Notifier shows one or more toastnotification-windows.
Besides it's possible to show your own window with your viewmodel as a toastnotification.
(I)NotifierManager should be a Singleton, if you use it from different classes, because all notificationwindos are saved internally and removed after closing. You can use a DI Framework like Ninject and register INotifierManager as Singleton.
Then call ShowNotification/ShowCustomNotification .
If you want to show your own window, you have to handle the animations and closing by yourself.
Show your own Notification:
call ShowCustomNotification(yourViewModel)
in App.xaml:
<Application.Resources>
<DataTemplate DataType="{x:Type local:yourViewModel}">
<local:TestView />
</DataTemplate>
</Application.Resources>
Product | Versions |
---|---|
.NET Framework | net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
-added NotificationBaseViewModel for custom notification window with datatemplate. Invoke OnCloseWindow to close the notificationwindow
-added parameter applyStandardSettings for custom window
applyStandardSettings applys WindowStyle = None
AllowsTransparency = true
Background = Transparent
Now you have the full control with your usercontrol.
You could do the same with the optional parameter settings, but this settings are mostly standard for the notification window and it would be irritating to use the settings parameter for this