-
-
Notifications
You must be signed in to change notification settings - Fork 946
Unable to create multithread UI #594
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I want to creat windows on new thread but get an error in window construct method(Can't access between each process can freeze "System. Windows. Media. SolidColorBrush", because can't freeze it).
I think the solution to this problem should be to make all Brush freezable.
To Reproduce
Creat new window as:
var thread = new Thread(()=>
ToolKitWindow = new():
ToolKitWindow. Closed += delegate
{
Dispatcher.CurrentDispatcher.BeginInvokeShutdown(DispatcherPriority.Normal):
};
ToolKitWindow. Dispatcher. Invoke(()=>
{
ToolKitWindow.Show():
Dispatcher. Run();
});
thread.SetApartmentState (ApartmentState. STA):
thread. Start();
Expected behavior
Creat success.
Screenshots
No response
OS version
11
.NET version
6
WPF-UI NuGet version
2.0.3
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working