Skip to content

Instantly share code, notes, and snippets.

@julesx
Created December 1, 2015 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julesx/3faa946ba041e88ab2ee to your computer and use it in GitHub Desktop.
Save julesx/3faa946ba041e88ab2ee to your computer and use it in GitHub Desktop.
public ObservableCollection<string> ComboBoxItems {get;set;}
public MainWindow()
{
ComboBoxItems = new ObservableCollection<string>();
ComboBoxItems.Add("one");
ComboBoxItems.Add("two");
DataContext = this;
}
<MainWindow>
<ComboBox ItemsSource="{Binding ComboBoxItems}" />
</MainWindow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment