Attached properties are a dependency property. The difference is how they are used.
With an attached property, a property is defined in a class that is not the same class for which it is used. This is usually used for layout. Good examples are Panel.ZIndex or Grid.Row â you apply this to a control (that is, a button), but it is actually defined in Panel or Grid. The property is "attached" to the button instance.
This allows the container, for example, to create properties that can be used on any UIelement.
As for the differences in implementation, it is mainly a matter of using Register vs. RegisterAttached when defining a property.
Reed Copsey Aug 06 '09 at 18:56 2009-08-06 18:56
source share