The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: ListBox in Silverlight
3 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

JM StephensPosted Dec 28, 2010, 6:03 PM
thanks
Satyadeep BeheraPosted Sep 22, 2010, 2:57 AM
Hi I am able to solve it by using PresentaionFrameWorkCollection<Object> Items = lstBox.Items; foreach(Object Item in Items) { CheckBox chkSelect = Item as CheckBox; if(chkSelect != null) chkSelcet.IsChecked = True; } But this works when I directly add some items to the ListBox, but if i am adding as ItemsSource as ObservableCollection<Model> object then giving error, does it means i need to create separate ClientViewModel which have a property boolean to handle the check/uncheck. if you have any suggestion please let me know.
Satyadeep BeheraPosted Sep 21, 2010, 9:14 AM
Hi I am writing for "Check All" method, can you tell me in the LostBox containt how to get each checkBox. i am trying lstBox.ItemContainGenerator.ContainFromItem(lstBox,Items[i]) as CheckBox Which returns null object.