Open MartinZikmund opened 3 years ago
I can't reproduce. @MartinZikmund Are you still able to reproduce?
@Youssef1313 thanks for trying to repro. Can you attach the repro you created for future reference ?
Sorry, I think it's reproducible. My bad!
Current behavior
Properties set in XAML are set before the event handlers are attached. This causes problems for example with
ToggleButton
-based controls where theChecked
event is not triggered whenIsChecked
is set in XAML.Expected behavior
Event handlers should be attached before dependency properties are set.
How to reproduce it (as minimally and precisely as possible)
Consider the following custom control:
Put it on a XAML page as follows:
Put breakpoints in the
Test
event "add" handler and in theOnChanged
method. Notice that in case of UWP, theadd
is hit first andOnChanged
afterwards, whereas in UnoOnChanged
is hit first andadd
after.Workaround
Environment
Nuget Package:
Nuget Package Version(s):
Affected platform(s):