Jean

Jean

  • NA
  • 5
  • 0

Binding a combobox to a list of strings

Mar 14 2009 8:12 PM
Is there anyone who has a nice example of how to bind a combobox so that it contains items from a List of strings?

Thanks.

this is how my code looks:

List<string> _items = new List<string>();
public List<string> Item
{get { return _items; }
  set { _items = value; }
}

and this is the combobox:

<ComboBox ItemsSource="{Binding Item}" Name="comboBox1" Width="120" />

Answers (4)