TheCodeKing / XDMessaging.Net

Easy-to-use, zero configuration solution for PubSub messaging across application and network boundaries.
http://thecodeking.co.uk/project/xdmessaging/
Other
61 stars 21 forks source link

HighPerformanceModeUI not working correctly #9

Closed bbuerger closed 7 years ago

bbuerger commented 7 years ago

The HighPerformanceModeUI is very unreliable (Windows 10, WPF) It is sometimes broadcasted only to the same thread, than another time only to another thread and sometimes not at all. The Compatibility modes is working perfect even between different processes.

TheCodeKing commented 7 years ago

HighPerformanceModeUI uses hidden Windows to listen for Windows messages. I've tested it works on WFP, but it might be there is cases where it does no (especially Windows 10, as this was written before it was released).

Do you have any example code?

bbuerger commented 7 years ago

Sure, https://github.com/bbuerger/WPFPlayground

TheCodeKing commented 7 years ago

HighPerformanceUI is only available directly from within a Windows Form class or a WPF Window. It creates a uses a hidden NativeWindow which listens for low level Windows messages.

As you are creating the listener in a ViewModel, this will only work in compatibility mode unless it's on the UI thread. If you were to move the listener to instantiate inside the WPF MainWindow code itself, then it should work.