Solved

bind a WPF combo box  item source to a class

Posted on 2013-01-15
1
578 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now