Showing Camera Roll pictures

Thread is closed for posting
2 posts, 0 answers
  1. Jandieg
    Jandieg avatar
    44 posts
    Member since:
    Feb 2012

    Posted 03 Mar 2012 Link to this post


    I am listing pictures from the phone's "camera roll", however it does not load async. When having more than 20 photos it lags about 3 seconds to then display all the pictures at once, items are not drawn progressively.

    Load list:
    var library = new MediaLibrary();
    var photos = (from p in library.RootPictureAlbum.Albums[1].Pictures
                                    select new ImageWrapper(p)).ToArray();
    list.ItemsSource = photos;

    public class ImageWrapper{
        public Picture Picture { get; set; }
         public ImageWrapper(Picture picture){
            Picture = picture;
        public ImageSource Image{
                var image = new WriteableBitmap(100,100);
                return image;

    <telerikPrimitives:RadDataBoundListBox x:Name="list" ItemTemplate="{StaticResource itemTpl}" DataVirtualizationMode="Automatic">
     <telerikPrimitives:WrapVirtualizationStrategyDefinition Orientation="Horizontal"/>

    I am using the latest 2012.1.301.2040 dev hotfix. I guess issue is the same as on this case.
  2. Todor
    Todor avatar
    798 posts

    Posted 06 Mar 2012 Link to this post

    Hi Jandieg,

    Thank you for your question.

    If you want the items to be drawn progressively, you can set the IsAsyncBalanceEnabled property to true, which will cause each visual container to be realized asynchronously upon initial binding. You can read about Asynchronous Balance in our online documentation here.

    I also noticed that you have set DataVirtualizationMode to Automatic, but it has no effect unless the itemsSource is of type VirtualizingDataCollection. You can read more about the data virtualization in RadDataBoundListBox here.

    I hope this information helps. Let me know if you need additional assistance.

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top