Fixes WPF designer crashes when trying to expand the Miscellaneous properties.
Using debugger, we can learn that "Application.Current?.MainWindow" throws an exception as the calling thread cannot access MainWindow, because a different thread owns it.
This doesn't make the touch section work completely again, but at least the designer in recent versions of Visual Studio (2022, 17.10) doesn't crash right away.
Fixes WPF designer crashes when trying to expand the Miscellaneous properties.
Using debugger, we can learn that "Application.Current?.MainWindow" throws an exception as the calling thread cannot access MainWindow, because a different thread owns it.
This doesn't make the touch section work completely again, but at least the designer in recent versions of Visual Studio (2022, 17.10) doesn't crash right away.