(0 votes)

Tip: How to use Path when binding?

1 comments   /   posted by Denislav Savkov on Aug 29, 2008


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.

Xaml

<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!

Filed under: Binding


Comments

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])?

Add Comment