1

Possible Duplicate:
Special symbols in WPF binding - what does “{Binding Path=.}” mean?

I am not getting the meaning of following code -

<DataTemplate>
    <Label>
       <Hyperlink Command="{Binding Path=.}">
           <TextBlock Text="{Binding Path=Header}"/>
       </Hyperlink>
    </Label>
</DataTemplate>

Can anyone explain it.

Community
  • 1
  • 1
RTRokzzz
  • 235
  • 1
  • 4
  • 14

2 Answers2

3

It is used to bind to the current source . For more info take a look here Binding Path hope this helps

Rohit
  • 10,056
  • 7
  • 50
  • 82
3

Binding basically you are going to binding to ViewModel class. For e.g. you have an class called person and it has property called "Name". What you need to do here is, So it will bind to your Class called Person and it's property called "Name".

<TextBlock Text="{Binding Path=Name}"/>
Nitheen Rao
  • 210
  • 2
  • 11