In this article I will how you can achieve Element to
Element Binding in Silverlight 3 using Blend 3.Creating a Simple
Open up Blend 3 and Create a new Silverlight
Application. Name it as ElementBindingBlend.
is the idea of our sample application we will increase the Font Size of a Text
Block control by using Slider Control's value.
Go ahead and add a
TextBlock and a Slider Control to your application.
select the Slider Control and change the following properties.
you see from the above figure I have changed the Maximum, Minimum and Value
Now Select the TextBlock Control and Find the Font Size
you see the above figure; you can see the default Font size is 8.25 and right to
that you will find the button to change the property.
Click the Button
and you will find the following options.
Data Binding and you will find the following Create Data Binding
the Element Property tab.
You will find the following controls added to
the application and their properties in the right side.
the above figure says; you need to select the Slider Control and select Value
property from the right side list of properties.
Press OK to finish the
As soon as you finish Data Binding the Font value becomes
not editable (Turns Yellow Border).
go ahead and run your application and slide the Slider to see the TextBlock's
Font size is changing accordingly.
it you have successfully used Data Binding in Blend 3.