Why is the Set and Get static methods not called in XAML?

I set breakpoints on my connected properties SetXXX and GetXXX static methods. In Xaml, I assigned values ​​to an attached property. However, I expected Set or Get calls to be called, but that is not the case. The attached property works as expected, and if I call the SetXXX and GetXXX methods in the code, it will work.

Why methods are not called when dialing from Xaml?

JD.

+3
source share
2 answers

As JaredPar explained , when you use XAML, GetXXX / SetXXX methods are not called.

I wanted to add something:

Attached Property , . , , , .

+3

XAML getter seters, . API DependencyObject. GetValue SetValue.

+5

Source: https://habr.com/ru/post/1739634/


All Articles