What does "{Binding Path =.}" Mean in WPF binding?

What does {Binding Path=.} Mean in WPF binding?

I see that some people use it, but could not find any explanation.

Are there any other special characters in the binding syntax (other than {Binding /} )?

+56
data-binding wpf xaml
Jun 30 '09 at 21:48
source share
2 answers

This is a shorthand for snapping to the current source. For more information see here .

+38
Jun 30 '09 at 22:02
source share

I found this WPF Binding CheatSheet a few months ago and find it very useful, especially for those who are learning WPF. It has some spelling mistakes, but it's still not bad.

Here is a quick excerpt (which should have table formatting):

 Basic Binding {Binding} Bind to current DataContext. {Binding Name} Bind to the "Name" proeprty of the current DataContext. {Bindind Name.Length} Bind to the Length property of the object in the Name property of the current DataContext. {Binding ElementName=SomeTextBox, Path=Text} Bind to the "Text" property of the element XAML element with name="SomeTextBox" or x:Name="SomeTextBox". 

Direct link to CheatSheet

+49
Jul 01 '09 at 14:21
source share



All Articles