Solved

Silverlight Combo Box

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

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…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…

821 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