An attached property is a property that is
declared by one control and attached to another. It allows the inclusion of
additional information with a control for later use by an external source.
Every control has its own set of intrinsic properties. Let's take an example of text box which has a specific font, text color, and text content as dictated by properties such as FontFamily, Foreground, and Text.)
Now when you place a control inside a container it gains additional features, depending on the type of container.
For example, if you place a text box inside a grid, you need to be able to choose the grid cell where it’s positioned.) These additional details are set using attached properties.
Attached properties always use a two-part name in this form:
DefiningType.
PropertyName.
This two-part naming syntax allows the XAML parser to distinguish between a normal property and an attached property.
Comments
Post a Comment