Skip Navigation LinksHome / Tips / View Tip

Tip: How to use Path when binding?

+ Add to SilverlightShow Favorites
2 comments   /   posted by Denislav Savkov on Aug 29, 2008
(0 votes)
Categories: Binding

Path is used to specify then name of the property of the underlying object to bind to. Additional you are able to use indirect property targeting to specify a sub-property of a property of the object. Currently it is not possible to bind to indexed properties.


<TextBlock Text="{Binding Name}"/>
<TextBlock Text="{Binding Path=Name}"/>
<TextBlock Text="{Binding Path=Account.OpenDate}"/>
<TextBlock Text="{Binding Path=Property1.Property2.Property3}"/>

That's it!



Comments RSS RSS
  • RE: Tip: How to use Path when binding?  

    posted by ED on Dec 16, 2008 12:35

    Can you bind to an indexed property (e.g. Path=Name[0])?

  • RE: Tip: How to use Path when binding?  

    posted by Animesh on Jan 08, 2009 15:28

    Yes u can...

Add Comment


Please add 4 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)