In this section, we will DataBind one property of the Rectangle shape to another one as follows:
Create a new project in Blend and name it
Chapter07
. Drag and drop a Rectangle shape onto the art board. This is shown in the following screenshot:Now, we will go ahead and DataBind the Height property of the rectangle to itself. The way to assign the source property in DataBinding is to assign the source of the property and the property path. To do that, move to the Properties panel, left-click on the small white rectangle next to the Height property, and then select Create Data Binding…. This is shown in the following screenshot:
Now, select the binding type as RelativeSource Self as we want to bind the rectangle with a property of its own. We will see a list of properties that the Height property can be bound to. Select Width: (Double) and click on OK. The following screenshot encapsulates this discussion:
Once we do that, we will see that the...