This is a migrated thread and some comments may be shown as answers.

Load images when filename unknown

3 Answers 46 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
Micko
Top achievements
Rank 1
Micko asked on 21 May 2013, 11:21 AM

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

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 24 May 2013, 03:15 PM
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.

0
Micko
Top achievements
Rank 1
answered on 24 May 2013, 08:34 PM
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

0
Yana
Telerik team
answered on 29 May 2013, 02:52 PM
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.

Tags
CoverFlow
Asked by
Micko
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Micko
Top achievements
Rank 1
Yana
Telerik team
Share this question
or