Load images when filename unknown

4 posts, 0 answers
  1. Micko
    Micko avatar
    4 posts
    Member since:
    Feb 2011

    Posted 21 May 2013 Link to this post

    Hi

    I have uploaded images using the RadUpload control to the usersupload folder as described in the telerik documentation. I now have a requirement to read those image files in a RadCoverFlow control and I wondered what might be the best approach in this scenario.

    Following some consideration I presume I will need to create a webservice which returns a collection of these images and then bind it to the controls itemssource? Is this a good approach in your opinion and if so how might I iterate over the directory to retrieve those images?

    Thanks

    Michael

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 24 May 2013 Link to this post

    Hi Michael,

    When you upload the files using our RadUpload, you can get the file name of each uploaded file and you can also use the TargetFolder to get the path to the images location. Such an approach is demonstrated in this demo solution.

    As you can see in the example each file is displayed as soon as it gets uploaded, but if you have already uploaded the files, you should know their path. For instance you can get it, as soon as the entire uploading is over. Once you have the names of all uploaded files, you can construct the path on the server where each file is uploaded and use it to create a BitmapImage which can be the source of an Image displayed inside a RadCoverFlow item.

    I prepared a sample solution demonstrating this approach. Please have a look at it and let me know if it can work for you or if I've missed something from your requirements.

    Regards,
    Tina Stancheva
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Micko
    Micko avatar
    4 posts
    Member since:
    Feb 2011

    Posted 24 May 2013 Link to this post

    Hi Tina,

    Thank you for your support. I understand what you've attempted to do however your implementation does not help me. If you take the RadUpload control out of the equation and only have the RadCoverFlow control in the view, how could I load the images that have been previously uploaded.

    Kind regards
    Michael

  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 29 May 2013 Link to this post

    Hi Michael,

    I would suggest to check our CoverFlow Data Binding online demo at the following link:
    http://demos.telerik.com/silverlight/#CoverFlow/DataBinding

    In the example we're using WebClient class to retrieve the data, but in your project it is up to you to decide which method to use ( web service or some other).  You just need to set ItemsSource property of the CoverFlow in order to show the images.

    Regards,
    Yana
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top