Solved

Silverlight Combo Box

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to use Dotfuscator CE with Visual Studio 2010 Installer? 4 402
Windows Installer 4 79
Poor Man's .NET Framework Certification 2 66
Problem to open text file 11 147
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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