Images from Isolated Storage

16 posts, 0 answers
  1. Brian
    Brian avatar
    2 posts
    Member since:
    Aug 2008

    Posted 21 Nov 2011 Link to this post

    Hi,

    I have a need to display image from Isolated Storage.   The control seems to only want source strings that are part of the project folder structure (eg images/...).  

    Is there a way to display images from Isolated Storage in the slide view control?

    Is there was way to pass the control a list of image objects?

    thanks,

  2. Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 23 Nov 2011 Link to this post

    Hi Brian,

    Thank you for contacting us and for your interest in RadControls for Windows Phone.

    We are planning to extend the SlideViewPictureSource to provide built-in support for loading pictures from the Isolated Storage as well as to support ImageSource instances directly. We will implement this functionality for the next Service Pack release of the tools - expected within a month.

    Please find attached a simple application that demonstrates how your scenario may be currently implemented. The ImageSource passed is loaded from an embedded image but you may plug the logic that loads images from the file system there.

    I hope this helps. Let me know if I can assist you further.

    Greetings,
    Georgi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Brian
    Brian avatar
    2 posts
    Member since:
    Aug 2008

    Posted 28 Nov 2011 Link to this post

    Georgi,

    Thanks.  With the sample app I got things working.

    Brian
  5. Michael
    Michael avatar
    52 posts
    Member since:
    Dec 2005

    Posted 19 Aug 2012 Link to this post

    Was this ever added to the control?  I figured it out, just like the last guy, but just curious...
  6. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 20 Aug 2012 Link to this post

    Hello Michael,

    As it turns out, this feature is not yet implemented in RadSlideView. Nevertheless, this is still in our ToDo list but I cannot commit its availability to a certain date or release. Let me know if you have further questions or comments regarding this topic.

    All the best,
    Kiril Stanoev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  7. Tiago
    Tiago avatar
    6 posts
    Member since:
    Feb 2013

    Posted 30 Jun 2013 Link to this post

    I'm trying to do this, but it's not working for me, I got some error when running the sample.
  8. Tiago
    Tiago avatar
    6 posts
    Member since:
    Feb 2013

    Posted 01 Jul 2013 Link to this post

    Now it's working, but I have a lot of Images and take a long time to load. How can I load at background and add dinamically?
  9. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 02 Jul 2013 Link to this post

    Hello Brian,

    You don't need to load all images at once. You need to load only those which are to be visualized.

    Otherwise you might consider using background workers?

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  10. Tiago
    Tiago avatar
    6 posts
    Member since:
    Feb 2013

    Posted 03 Jul 2013 Link to this post

     My Applicattion shows a gallery of images like the native on windows phone, how can I achieve this? How can I add the images dinamically?
  11. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 08 Jul 2013 Link to this post

    Hi Tiago,

    You can simply create a source of business objects which contain the Uri of the image which is stored in the Isolated Storage of your application. When you bind RadSlideView to this source, you will load the images on demand and make sure you do not store any reference to them in your ViewModel so that they can be garbage collected when not needed anymore. The following code demonstrates how loading an image from the IsoStore is done:

    public ImageSource ImageSource
    {
         get
         {
              using (var sourceFile = _storage.OpenFile(isolatedStoragePath, FileMode.Open, FileAccess.Read))
              {
                      BitmapImage bm = new BitmapImage();
                      bm.SetSource(sourceFile);
                      return bm;
              }
         }
    }


    So you can put a similar property on your data item and use it in the DataTemplate in RadSlideView.

    Regards,
    Deyan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  12. Tiago
    Tiago avatar
    6 posts
    Member since:
    Feb 2013

    Posted 27 Jul 2013 Link to this post

    Deyan,

    Can you provide a sample? I can't figure out.
  13. Todor
    Admin
    Todor avatar
    778 posts

    Posted 31 Jul 2013 Link to this post

    Hi Tiago,

    I have attached a sample. First click the AddImage button and select an image from the library, then go to the slide view page and see how the image are loaded one by one. You can use similar approach to display different images.

    Regards,
    Todor
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  14. dev
    dev avatar
    20 posts
    Member since:
    Dec 2005

    Posted 01 Apr 2014 in reply to Todor Link to this post

    hello,
    this example works with large images size?
  15. dev
    dev avatar
    20 posts
    Member since:
    Dec 2005

    Posted 01 Apr 2014 in reply to Todor Link to this post

    your example with this image is very very slow and crashes

    use this image:
    https://dl.dropboxusercontent.com/u/26312884/2.jpg
  16. Todor
    Admin
    Todor avatar
    778 posts

    Posted 02 Apr 2014 Link to this post

    Hello,

    Make sure that the size of the images that you use is optimized for phone.
    Have a look at this article, which recommends usage of images up to 2000 x 2000 pixels.

    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  17. Vitalii
    Vitalii avatar
    104 posts
    Member since:
    Jul 2013

    Posted 18 May 2014 Link to this post

    I also had a similar problem with loading and using images. Moreover, there was a problem with memory leak (by default, in wp7, image.OnLoaded event was left unsubscribed after navigating from the page).
    I tried several solutions, and i found this one: https://github.com/artem-zinnatullin/jet-image-loader Seems quite stable: i had no issues with it.
Back to Top
DevCraft banner