public class FontType
{
...
public String Name { get { return _name; } }
public String DisplayName { get { return _displayName; } }
public Font UseFont { get { return _font; } }
}
bindFontTypes.DataSource = availableFonts;
comboFontType.DataSource = bindFontTypes;
comboFontType.ValueMember = "Key";
comboFontType.DisplayMember = ...???;
Here, bindFontTypes
is BindingSource. availableFonts
is a Hashtable where Keys are strings, and Values are objects of FontType. For comboFontType.DisplayMember
I want to use objects' .DisplayName property. How do I specify that? Is it possible?