Attached Properties : properties that may apply to several controls but are defined in a different class.In WPF,they are basically used to control layout.
It took some time for me to understand what exactly are Attached Properties.I will explain you in a very simple manner so that you can have brief knowledge about it and by getting the basic idea can explore more.
Attached Properties : properties that may apply to several controls but are defined in a different class.In WPF,they are basically used to control layout.
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.
Example :
<TextBox ... Grid.Row="0">
[Place question here.]
</TextBox>
Here defining type is the Grid class, and the property is Row.

About the Author
Full Name:
Nikki VermaMember Level: Starter
Member Status: Member
Member Since: 12/16/2008 12:38:53 AM
Country: