Where can I find some good documentation on data/element binding? My Google searches haven't turned much up. I had a custom class with two properties named Text and Value. When I tried binding a list to a listbox it wouldn't work. By chance I modifed my datatemplate from this
<TextBox Text="{Binding Text}"></TextBox>
to this
<TextBox Text="{Binding Path=Text}"></TextBox>
and then everything worked great. I need some indepth documenation/samples to data/element binding. I don't understand why some examples have the path
set whereas others do not. A full explanation of this, and all other nice to know tips would be much appreciated.
UPDATE
Here's the class I'm using. It's a simple helper class so I can translate the value/text of an enum into my listbox
public class Item
{
private string _Text = "Test";
public string Text
{
get { return _Text; }
set { _Text = value; }
}
private string _Value = "1";
public string Value
{
get { return _Value; }
set { _Value = value; }
}
}