Hello everyone,
I am working on a WPF project and found an issue ot thread calls.
I have a Dependency Property of a usercontrol as below
- public bool IsON
- {
- get { return (bool)GetValue(IsONProperty); }
- set { SetValue(IsONProperty, value); }
- }
I tried lock function with a readonly object but no luck.
Is there any solution to make it thread safe on user control side and not from the calling class because I want to handle it from usercontrol side, as the property was used several times
Thanks
Devendra

Amit GuptaRank #190 · 12.8K reputationPosted Jun 12, 2020, 1:29 AM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jun 11, 2020, 7:07 PM EDT
Devendra KumarRank #2,966 · 487 reputationPosted Jun 12, 2020, 9:39 PM EDT