It is possible to bind a Dictionary to a Listbox, keeping in sync between the Listbox and the member property?
It is possible to bind a Dictionary to a Listbox, keeping in sync between the Listbox and the member property?
label1.Text= listBox1.SelectedIndex.ToString();
if ( listBox1.SelectedItem is KeyValuePair<int,DockStyle>)
{
var temp1 = (KeyValuePair<int, DockStyle>)listBox1.SelectedItem;
label3.Text = temp1.Key.ToString();
label4.Text = temp1.Value.ToString();
}