Closed b00ted closed 5 years ago
In your WinForms app, just call this in your Program.Main for C#
var app = new System.Windows.Application();
Or this in your ApplicationEvents MyApplication.MyApplication_Startup for VB
Dim app As New System.Windows.Application
Is @jonnyb023 's answer fixed your problem?
Library version
2.5.1
Expected behaviour
Show notification
Actual behaviour
Null reference exception
Steps to reproduce behaviour
Create winforms app Add WPF window with Notifier Try to show notification
Code to reproduce behaviour
Questions
The problem is in
CreateConfiguration()
method in Notifier.cs. In this case there is noApplication.Current
at all, soDispatcher = Application.Current.Dispatcher
throws an exception. So simplest way to solve this - just adding ? afterApplication.Current