Solved

bind a WPF combo box  item source to a class

Posted on 2013-01-15
1
593 Views
Last Modified: 2013-02-17
Hello experts,
I am new to WPF and working on populating a combo box with information from a class. I have looked at some examples on the web but can't seem to get it to work properly. What I'm trying to do is populate the the items from a class I have set up. I have figured out how to bind the text boxes from the datacontent of the window. But how to bind the items of the combo box to a class. I am using VB.net for the code behind.
Thank you,
John
0
Comment
Question by:DjJohnny
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 38781717
combobox binding in wpf is tricky cause it works only if you bind to a property and the only property combobox has is Length.
so you wanna use ComboBoxItemString class which has property ValueString to bind to.
check here for example and description:
Step by Step WPF Data Binding with Comboboxes
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question