(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

Tip: XAML Element Binding

(4 votes)
Emil Stoychev
Emil Stoychev
Joined Oct 15, 2007
Articles:   23
Comments:   98
More Articles
3 comments   /   posted on Mar 24, 2009
Categories:   Data 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.


Download source code


{Binding Value, ElementName=MySlider}

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

Hope that helps!

That's it!



  • -_-

    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)

  • emil

    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

Login to comment:
  *      *