dotnet / dotnet/wpf

We can change the dispatcher in dependency property recursively.

Open
#174 6 comments 2 reactions 0 assignees View on GitHub
API suggestion Design Discussion
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

Sometime, we may write the code cross thread to improve performance. But we are hard to share the dependency property to other thread.

As we know the DependencyObject is inherited from DispatcherObject in WPF. And the WPF use DispatcherObject.CheckAccess to check the calling thread and the creating thread. Some of the dependency property will call the DispatcherObject.DetachFromDispatcher to set their dispatcher to null to share the dependency property to other threads.

But I need to change all of the DependencyObject in a control that I want to share it with other threads. I hope we can use some method like Freeze to freeze some control to share it with other threads. Or we can set the dispatcher in dependency property recursively.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.