i have a simple book application with a MultiScaleImage control on each page. The larger the collection of MSICs, the more memory will be taken up. Is there any built in way to let's say have only 6 pages loaded at a time and dynamically load / unload on page flip?
Thanks,
Tobias
1 Answer, 1 is accepted
0
Kiril Stanoev
Telerik team
answered on 24 Feb 2011, 08:43 AM
Hi Tobias,
At any given moment there are no more than 10 pages within RadBook that are being rendered. No matter if your collection consists of 100 or 1000 items. In your particular scenario, I am not sure what will be the memory consumption when there are 10 MultiScaleImage controls.
Currently RadBook does not offer load on demand functionality out of the box (similar to RadTreeView). However, in scenarios like yours, such functionality makes sense so I'll add an item in our public issue tracking system under the name "Book: Load on demand support" which will be available for tracking and voting tomorrow the latest.
Bellow is one possible way to implement load on demand:
pages.Add(newPage() { Title = "Page "+ (pages.Count).ToString() });
pages.Add(newPage() { Title = "Page "+ (pages.Count + 1).ToString() });
pages.Add(newPage() { Title = "Page "+ (pages.Count + 2).ToString() });
pages.Add(newPage() { Title = "Page "+ (pages.Count + 3).ToString() });
pages.Add(newPage() { Title = "Page "+ (pages.Count + 4).ToString() });
pages.Add(newPage() { Title = "Page "+ (pages.Count + 5).ToString() });
}
}
}
}
Page.cs
namespaceSilverlightApplication1
{
publicclassPage
{
publicstringTitle { get; set; }
}
}
Let me know how I can be of further assistance.
Best wishes,
Kiril Stanoev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!