PropertyChanged handler for Dependency Property is called before OnApplyTemplate is called #11261
-
I am running into a situation where the proprety changed handler for a dependency property is being called before
I'm not sure what to make of this or if it even applies to my scenario. In my case the control is defined in a control library. The template for the control is defined in Themes/Generic.xaml. Should |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Thanks for the report. WPF and WinUI are different, and you may want to validate that the scenario against a WinAppSDK app first. It may still be that Uno behaves differently though. If you can make a repro of this behavior, we can track that in an issue. |
Beta Was this translation helpful? Give feedback.
-
I somewhat agree. On the other hand we expect a framework that is rational and predictable. We use implicit sequences everywhere from math At some point the order of operations must be known and predicable. The logic to enforce order of operations can be at the framework level or in my code. If in my code I have to define it, someone else has to learn it, and I will probably have to repeat it for various controls that I write. In my case this is not an insurmountable obstacle. I call
One of the property changed callbacks in my control expects |
Beta Was this translation helpful? Give feedback.
-
I cannot advocate strongly enough for fixing both #3519 & #2895 as quickly as possible. |
Beta Was this translation helpful? Give feedback.
-
@sam-wheat - It feels like this person is having as different manifestation of basically the same issue, WASM Data binding broken #11901. You might also find Page Loading Fails - Potentially because 2 nested XAML controls in a direct parent/child get instantiated/InitializeComponented/loaded in different order between WASM / WinUI #10276 useful as well. |
Beta Was this translation helpful? Give feedback.
Thanks for the report.
WPF and WinUI are different, and you may want to validate that the scenario against a WinAppSDK app first. It may still be that Uno behaves differently though. If you can make a repro of this behavior, we can track that in an issue.