Solved

Silverlight Combo Box

Posted on 2009-05-07
2
2,054 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

21 Experts available now in Live!

Get 1:1 Help Now