What is the difference betweeen the following:
All these dependency properties ar
SelectedItem
is an object
.
SelectedValue
and SelectedValuePath
are string
s.
for example using the ListBox:
if you say give me listbox1.SelectedValue
it will return the text of the currently selected item.
string value = listbox1.SelectedValue;
if you say give me listbox1.SelectedItem
it will give you the entire object.
ListItem item = listbox1.SelectedItem;
string value = item.value;