Solved

Silverlight Combo Box

Posted on 2009-05-07
2
2,053 Views
Last Modified: 2013-11-12
In WPF, I had a combo box with an attribute of "Text"  I was able to bind the selected value of the combo box with the following:  Text="{Binding CarrierCriteria.insExpDateOperator}"

In Silverlight, there is no Text attribute.  How do I capture the users selected value?

Here is the element:
<ComboBox >
     <ComboBoxItem Content="&gt;"></ComboBoxItem>
     <ComboBoxItem Content="&gt;="></ComboBoxItem>
     <ComboBoxItem Content="&lt;"></ComboBoxItem>
     <ComboBoxItem Content="&lt;="></ComboBoxItem>
     <ComboBoxItem Content="="></ComboBoxItem>
</ComboBox>

0
Comment
Question by:dchau12
2 Comments
 
LVL 16

Accepted Solution

by:
TSmooth earned 500 total points
ID: 24327179
To capture the user's selected value, you would bind to the "SelectedItem" attribute. With silverlight comboboxes, there is no SelectedValue but you can emulate it. Take a look at this article for more information.

http://blogs.msdn.com/mikehillberg/archive/2009/03/26/implementing-selectedvalue-with-the-silverlight-combobox.aspx
0
 

Author Comment

by:dchau12
ID: 24328704
I read that article before and I have already implimented the work around for SelectedValue where my datasources are web service objects.

SelectedItem brings back the whole object.  I am hoping it works for a static list in the combo box.  The web service is down, so I'll test it in a bit when it comes back up.
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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

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

12 Experts available now in Live!

Get 1:1 Help Now