This is a migrated thread and some comments may be shown as answers.

Can't get enough item in a Listbox in Silverlight

2 Answers 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tuan
Top achievements
Rank 1
Tuan asked on 22 Dec 2011, 08:54 AM
Hi telerik team,

I try to get All Items in a Checked List Box in Silverlight but telerik only get the Visible Item, if I want to get the others item, i have to scroll down and get the list again. I wonder are there any way to get full list?
This is how I get it
ListBox chkListCategories = grid.Find.ByName<ListBox>("chkListCategories");
GlobalObject.SILVERLIGHTAPP.VisualTree.Refresh();
IList<TextBlock> textlist = chkListCategories.Find.AllByType<TextBlock>();

Thank you

2 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 22 Dec 2011, 03:58 PM
Hello Tuan,

This is a Silverlight virtualization issue. The visual tree only contains data necessary to render the UI, and perhaps one or two more records before and after. You'll have to scroll the ListBox and get the items along the way. See here for more information.

All the best,
Anthony
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Tuan
Top achievements
Rank 1
answered on 23 Dec 2011, 03:07 AM
Hi Anthony,

Thank you for the link to the post. It's really helpful.

Tuan
Tags
General Discussions
Asked by
Tuan
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Tuan
Top achievements
Rank 1
Share this question
or