Recommended

Skip Navigation LinksHome / Tips / View Tip

XAML Element Binding

+ Add to SilverlightShow Favorites
3 comments   /   posted by Emil Stoychev on Mar 24, 2009
(2 votes)
Categories: General , Binding

Silverlight 3 enables property binding to CLR objects and other UI components via XAML – UI to UI binding. It is useful in a lot of scenarios and saves time for both developers and designers.

Example

Download source code

Syntax

{Binding Value, ElementName=MySlider}

where Value is property of a CLR object and MySlider is the name of this object

Hope that helps!

Share


Comments

Comments RSS RSS
  • RE: XAML Element Binding  

    posted by Matt on Sep 11, 2009 19:12
    Is there supposed to be something in this article between the Example heading and the Download source code? Just checking because my screen shows a huge white space (Firefox browser). Just letting you know - keep up the good work.

    -Matt (VB)


  • RE: XAML Element Binding  

    posted by emil on Sep 14, 2009 10:14
    Thanks, Matt! The demo is fixed.
  • RE: XAML Element Binding  

    posted by charlierlee on May 07, 2010 00:30
    That's great, but what if the item you want to bind to is not anywhere your current FrameworkElement? The binding fails :(
    Anyways, it turns out, if you wrap your content in a ContentControl, the binding succeeds.

Add Comment

 
 

   
  
  
   
Please add 5 and 5 and type the answer here:

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)