Guru E. Technology

need of every business.

Bind Combo-Box Control with IList – Simple Example

Data binding for the WPF controls same as the WF controls little bit difference with binding option.

//Code behind.
//Create IList for the object.
IList listObject = new List();
//Add item to IList.
ObjectList item = new ObjectList();
item.Name = “A”;
item.Value = 1;

//Bind IList to control.
cmbControlName.ItemsSource = listObject;
cmbControlName.DisplayMemberPath = “Name”;
cmbControlName.SelectedValuePath = “Value”;

//XAML file.

Tags: , ,

Posted in Developer Solutions, WPF

2 Responses to “Bind Combo-Box Control with IList – Simple Example”

  • NBA MLB Soccer Jerseys says:

    I tried viewing your blog on my new iphone 4 and the layout does not seem to be correct. Might wanna check it out on WAP as well as it seems most cellphone layouts are not working with your site.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>