Stuck when launching MetroWindow in a Separate Thread
See original GitHub issueDescribe the bug
This is the code with problem. SplashThread = new Thread(new ParameterizedThreadStart((state) => { var wnd = new MetroWindow(); wnd.Show(); Dispatcher.Run(); })); SplashThread.SetApartmentState(ApartmentState.STA); SplashThread.IsBackground = true; SplashThread.Start();
Steps to reproduce
Expected behavior
Show a window before main window shown.
Actual behavior
Program stuck in line wnd.Show().if I modify the code like this, use Window instead of MetroWindow.
SplashThread = new Thread(new ParameterizedThreadStart((state) => { var wnd = new Window(); wnd.Show(); Dispatcher.Run(); }));
The window show normally. Is there anything I do wrong?
Environment
MahApps.Metro version: v2.2.0
Windows build number: Win10 1909 [Version 10.0.18363.836]
Visual Studio: 2019 16.7.3
Target Framework: v4.7.2
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
MahApps.Metro window not showing with version 2.2.0 ...
This is started in different thread. However, execution does not happen after I call the Show() function. I mean the window doesn't show....
Read more >MahApps.Metro v2.3.1 release notes (2020-10-24) | LibHunt
Version Release Notes from October 24, 2020 (over 2 years ago) ... #3944 Stuck when launching MetroWindow in a Separate Thread; #3943 Popup...
Read more >How to start WPF in separate thread and still updating it ...
I want to have a WPF window that takes data from a BlockingCollection<ColorAddress>(ConcurrentQueue<ColorAddress>) continuously. I have managed ...
Read more >Stuck in Metro apps screen - Win-key doesn't toggle
Sometimes when I toggle from the classic desktop to the metro desktop using the Win key there is no way for me to...
Read more >Issue with opening IOS Simulator
Hi, I am developing an App in React Native for this i need Xcode. However when i start my Expo Developer Tool Metro...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Exactly. Fixed that already. We just have to release a new version of ControlzEx. I also made the PInvoke-Wrappers we have there appear in the StackTrace again.
I will close this here for now, the final fix will be available with the next release of ControlzEx.