Element To Element Binding In Silverlight 3 Using Blend 3

No.of Views485
Bookmarked0 times
Downloads 
Votes0
By  dpatra   On  16 Feb 2010 00:02:01
Tag : Silver Light and XAML , How to
Element To Element Binding In Silverlight 3 Using Blend 3
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 Introduction
In this article I will how you can achieve Element to Element Binding in Silverlight 3 using Blend 3.

Creating a Simple Silverlight Application
Open up Blend 3 and Create a new Silverlight Application. Name it as ElementBindingBlend.


Image Loading...


Here 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.

Image Loading...


Now select the Slider Control and change the following properties.

Image Loading...

As you see from the above figure I have changed the Maximum, Minimum and Value properties.
Now Select the TextBlock Control and Find the Font Size property.

Image Loading...

If 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.

Image Loading...

Choose Data Binding and you will find the following Create Data Binding dialog:

Image Loading...

Choose the Element Property tab.
You will find the following controls added to the application and their properties in the right side.

Image Loading...

As 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 Data Binding.
As soon as you finish Data Binding the Font value becomes not editable (Turns Yellow Border).

Image loading...

Now go ahead and run your application and slide the Slider to see the TextBlock’s Font size is changing accordingly.

Image Loading...

That’s it you have successfully used Data Binding in Blend 3.
Enjoy Coding.


About the Author


Diptimaya Patra

Description :I am a Master in Computer Application (MCA) from SRM University, Chennai. I am MCTS in ASP.Net Web Development, and MOSS 2007 Administration. I have extreme exposure to Microsoft Technologies in recent times like Silverlight 2, Silverlight 3. I am from Cuttack, Orissa. You can reach me using this mail (diptimaya.patra@gmail.com). Currently I am working as a Software Engineer in UST Global Inc in Trivandrum Center.

Occupation :Software Engineer
Company : UST Global.
Location : India
Follow me at twitter : http://twitter.com/dpatra


 
Sign Up to vote for this article
 
About Author
 
dpatra
Occupation-Not Provided
Company-Not Provided
Member Type-Expert
Location-Not Provided
Joined date-13 Jul 2009
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top