Monday, May 5, 2008

Inherit properties

When I investigated WPF feature, I was interesting how use inherit property (If consider that Binding is low performance feature). I used these properties as RegisterAttached only. I have write some test samples but these didn’t work to my of the confuse. Little search in MSDN founded the root of problem. It locate in end of inherit property document, after eulogy powerful this feature.
Note:

Although property value inheritance might appear to work for nonattached dependency properties, the inheritance behavior for a nonattached property through certain element boundaries in the run-time tree is undefined. Always use RegisterAttached to register properties where you specify Inherits in the metadata.

So, this is no surprise that my samples didn’t work. You can read more here.

No comments: