"" . System.ComponentModel.INotifyPropertyChanged , - :
private String _SelectedPart = String.Empty;
public String SelectedPart
{
get
{
return _SelectedPart;
}
set
{
if (_SelectedPart != value)
{
_SelectedPart = value;
PropertyHasChanged();
}
}
}
"ObjectDataSource" (Shift-Alt-D VS2008 ), ComboBox :
DataSource, ObjectDataSource "BindingSource", .
DisplayMember, Name
ValueMember,
DataBindings.SelectedValue, SelectedPart "BindingSource".
I know that the above sounds are complex, and it may take a little to find all the parts that I just described (I want to give you a tutorial or a screenshot), but in fact it is very quick to do as soon as you get used to it .
This, by the way, is considered "data binding" in .NET, and there are some good tutorials that can give you more information.
source
share