How to bind Dictionary to ListBox in WinForms

Viewed 39960

It is possible to bind a Dictionary to a Listbox, keeping in sync between the Listbox and the member property?

3 Answers
        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();


        }
Related