PanAndZoomImage memory issues

Thread is closed for posting
2 posts, 0 answers
  1. Dexterously
    Dexterously avatar
    1 posts
    Member since:
    Jul 2012

    Posted 25 Mar 2014 Link to this post

    I am working on an application that has a list of songs, and when they select a song it shows the sheet music for it. The sheet music is in png format and they are included in the app file as Content for build action.

    When they select a song, I navigate to a new page just set the PanAndZoomImage source to that file using this code:

    var contentFolder = await global::Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Content");
    var songAttachmentsFolder = await contentFolder.GetFolderAsync(
    var file = await songAttachmentsFolder.GetFileAsync(item.URL);<br><br>BitmapImage bi =
    new BitmapImage();
    bi.UriSource =
    new Uri(file.Path);
    image.Source = bi;

    Each image file is only about 300KB.

    The application crashes after loading between 3-6 times that control.
    Changing the control from PanAndZoomImage to just the standard Image control it doesn't cause the crash.

  2. Todor
    Todor avatar
    798 posts

    Posted 27 Mar 2014 Link to this post


    Thank you for writing.

    It will be great if you send us a sample project which reproduces the issue, so we can find exactly what's causing the leak.

    Please note that you need to open a new support ticket in order to be able to attach files.


    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

Back to Top