I have a WPF log viewer user control that receives log messages via named pipes. The pipe messages are received and processed on a thread pool thread and then I pass it to the UI for display with an Application.Current.Dispatcher.Invoke call. Works like a charm when running in a .Net host application.
When I host the control in an unmanaged C++/CLI application using HwndSource, Application.Current is null. How do I execute code on the UI thread in this scenario?