All the DependencyPropertyKey
's in common elements parent classes (FrameworkElement
, UIElement
, ...) should be protected
#10396
Labels
When creating custom controls or framework elements, sometimes we have to handle internally things like
IsMouseOver
or other readonly dependency properties, inside the code behind of the control.I don't know if there is a "proper way" to do this, but override
OnDependencyPropertyChanged
seems wrong to me, because I'm adding overhead for every DP change, and using the corresponding event is fine except there are some properties that doesn't have it (IsMouseOver
as example).Therefore, I'm just using a dirty trick
And I think this should be allowed by default, just doing the
Key
protected.If I am in the wrong and I should do it another way, please, don't hesitate to tell me what is the "proper way" to do it.
The text was updated successfully, but these errors were encountered: