Duplicate of :
In WPF we can assign list of item to ComboBox in 2 ways
//CODE #1
//WPF
<ComboBox name="cmbItems" ItemSource={Binding} />
//C#
cmbItems.DataContext = someList;
another way, directly assign itemsource
//CODE #2
//WPF
<ComboBox name="cmbItems" ItemSource={Binding} />
//C#
cmbItems. ItemSource = someList;
both serves the purpose, but whats the difference in above snippet? and which is good to use?