CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009

    WPF Image list viewer problem


    Im having trouble figuring out on how to implement my Image List viewer with the following specs;

    - The image viewer loads more than 1000 files but must take less memory. It is given that each files is atleast 1mb each.

    Therefore loading 1000 image alone already takes 1GB of memory.

    My current implementaion simply loads all images to a Listbox binded to a List of images, and this list box is inside a scrollviewer (vertical scroll). This implementation obvoiusly is using more memory since it loads all images.

    My plan is to load image only if visible in the scrollviewer, if not visible then image is dereference or not loaded at all.

    DO you have any idea on how to implement this type of requirement?
    Thanks in advance,
    Last edited by cebugdev; June 15th, 2009 at 05:02 AM.

  2. #2
    Join Date
    Jan 2009

    Re: WPF Image list viewer problem

    I'm not sure if a scrollviewer is the way to go or not... but in general you will want to look into WPF controls that provide virtualization features by default (ListBox and ListView). As you already stated, you will not want to pre-load all your images.

    Check out Paul McClean's article on WPF virtualization:
    WPF: Data Virtualization

    I have found this helpful as well:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.