Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit ComboBox selection change using C#
4 replies. Latest Post by Peter from SFW on March 6, 2009.
(0)
Peter fr...
Member
164 points
51 Posts
03-06-2009 6:07 PM |
Last week a managed to make a ScrollViewer and a TreeView to scroll up/down through clicking unrelated buttons or scrolling the mouse wheel by using AutomationPeers.
I tried to move the items of a ComboBox box up/down without opening the popup below through C#, but it does not work. I noticed that when the ComboBox is focused you can move the items up/down by using the arrow keys on the keyboard, so there has to be a way to do what I am trying to do.
Is there anyone who has done that already?
Keith.Ma...
Participant
872 points
131 Posts
03-06-2009 6:47 PM |
Did you try changing the SelectedIndex propery on the ComboBox control?
03-06-2009 7:20 PM |
Thank you for suggesting to modify the 'SelectedIndex'.
It does force the control to show next selected index...
03-06-2009 7:30 PM |
That does not sound right; the ComboBox visuals should update if you change the SelectedIndex. If it is possible, it would be great to take a look at some code/xaml that exhibited this behaviour so I could determine if there is a bug in the platform.
03-06-2009 7:38 PM |
You are right, I had to edit my Post after I figured it out... I guess when I saw the problem, I was not paying enough attension...
Thank, again...