Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit highlighted selected items in listbox
8 replies. Latest Post by lee_sl on January 7, 2009.
(0)
rohitnegi09
Member
2 points
63 Posts
01-06-2009 6:01 PM |
how to highlighted the selected items in listbox but more than 2 items should be higlighted at a time.
means seelct one item then that will highlighted and next item selected than that will highlighted but first item also be highlighted.
please help me on this regard.
Thanks
davidezo...
Contributor
5682 points
871 Posts
01-06-2009 6:14 PM |
Hi,
read this article: http://weblogs.asp.net/hpreishuber/archive/2008/11/07/silverlight-multiselect-listbox.aspx
01-06-2009 6:18 PM |
Thanks for ur reply.
but i seen this it before but it is basically based on check box but i am not using check box in listbox.
please reply.
meykih
Participant
876 points
210 Posts
01-07-2009 3:24 AM |
Hey rohitnegi09,
the point is that in general a listbox (standardly with listboxitems) doesn't allow multiple selection. That's why in the example there is used a group of checkboxes. They are (as far as I know) the only control with a multiple selection possible. If you want them to look like normal listboxitems you can change their style so that the square disappears. I did something similar with radiobuttons...
01-07-2009 4:37 AM |
Thanks For ur reply..ihave no conserned about multiple selection.i want that if i select any item that background should be change and when we select another one than last one background should not be changed.
so please help me on this regard.
Regards
01-07-2009 4:49 AM |
But that exactly is the typical behaviour for multiple selection. Select one item and then another one and keep the first one selected. Then the first one will also keep the defined style for selected items...
01-07-2009 5:05 AM |
Thanks Maike for ur reply
Can You share some piece of code in which you are using radiobutton for multiple selection?
01-07-2009 7:53 AM |
Think you got me wrong. I didn't use radiobuttons for multiple selection (cause that won't make sense) but I created a style for radiobuttons so they looked like simple textitems.
lee_sl
2990 points
584 Posts
01-07-2009 12:12 PM |
Here is a sample implementation
http://leeontech.wordpress.com/2009/01/07/multiple-selection-listbox/