March 2003
Intermediate to advanced
896 pages
32h 35m
English
ListControl
This is the abstract base class for list-like
Control objects, such as the
ListBox, ComboBox, and derived
classes.
It provides the basic template for data binding through the
DataSource, DisplayMember, and
ValueMember properties. Simple selection is
accomplished with the SelectedIndex and
SelectedValue members.
The concrete derived classes will extend these basic features to offer more specific functionality.
public abstract class ListControl : Control { // Protected Constructors protected ListControl(); // Public Instance Properties public object DataSource{set; get; } public string DisplayMember{set; get; } public abstract int SelectedIndex{set; get; } public object SelectedValue{set; get; } public string ValueMember{set; get; } // Protected Instance Properties protected CurrencyManager DataManager{get; } // Public Instance Methods public string GetItemText(object item); // Protected Instance Methods protected object FilterItemOnProperty(object item); protected object FilterItemOnProperty(object item, string field); protected override bool IsInputKey(Keys keyData); // overrides Control protected override void OnBindingContextChanged(EventArgs e); // overrides Control protected virtual void OnDataSourceChanged(EventArgs e); protected virtual void OnDisplayMemberChanged(EventArgs e); protected virtual void OnSelectedIndexChanged(EventArgs e); protected virtual void OnSelectedValueChanged(EventArgs e); protected virtual void OnValueMemberChanged(EventArgs
Read now
Unlock full access