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

Binding coverFlow to in memory images...

8 Answers 165 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
Ciro
Top achievements
Rank 1
Ciro asked on 28 May 2009, 07:02 PM
Hi guys,

I have an array of WriteableBitmaps and would like to bind it to the coverflow in order to look at the images. I'm trying to bind it to this collection but nothing gets shown up. What i'm missing?

I've tried to bind to an WriteableBitmap Array and to an Image array but neither worked.

8 Answers, 1 is accepted

Sort by
0
Ciro
Top achievements
Rank 1
answered on 28 May 2009, 08:28 PM
To ellaborate a little more i'm sending the source code:

 

Image[] imgs = new Image[5];

 

imgs[0] =

new Image();

 

 

BitmapImage bi3 = new BitmapImage();

 

bi3.UriSource =

new Uri("Images/Img1.Jpg", UriKind.Relative);

 

imgs[0].Source = bi3;

imgs[1] =

new Image();

 

bi3 =

new BitmapImage();

 

bi3.UriSource =

new Uri("Images/Img2.Jpg", UriKind.Relative);

 

imgs[1].Source = bi3;

imgs[2] =

new Image();

 

bi3 =

new BitmapImage();

 

bi3.UriSource =

new Uri("Images/Img3.Jpg", UriKind.Relative);

 

imgs[2].Source = bi3;

imgs[3] =

new Image();

 

bi3 =

new BitmapImage();

 

bi3.UriSource =

new Uri("Images/Img4.Jpg", UriKind.Relative);

 

imgs[3].Source = bi3;

 


//This is the part that doesn't work
WriteableBitmap
w = new WriteableBitmap(Convert.ToInt32(element.ActualWidth), Convert.ToInt32(element.ActualHeight), PixelFormats.Bgr32);

 

w.Render(element,

new ScaleTransform());

imgs[4] =
new Image();

 

imgs[4].Source = w;

 

//End

coverFlow.ItemsSource = imgs;

What happens is that the first 4 images gets shown but, the last one, built on the fly, does not... Any ideas?

 

0
Miroslav Nedyalkov
Telerik team
answered on 01 Jun 2009, 09:39 AM
Hello Ciro,

If I understand correctly you use Silverlight 3 and its feature to create bitmaps on-the-fly. Unfortunately RadCoverFlow still does not support that.

You can try to work it around by creating List of ImageSources and when all the images are created to set the list to the CoverFlow ItemsSource property. I'm afraid we cannot guarantee that this will work as the control is not tested with this feature completely but I will be happy to get your feedback if you follow the described approach.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Jeremy
Top achievements
Rank 1
answered on 29 Jun 2009, 01:29 PM
have you had any luck with this?  I'm trying to do the same thing...

Thanks,

jd
0
Gary Danielson
Top achievements
Rank 1
answered on 29 Jun 2009, 10:33 PM
I need this feature as well.  It seems that if the Items.Add were overloaded so that it could accept a string (location) or 

BitmapSource or BitMapImage that would work. 

0
Jeremy
Top achievements
Rank 1
answered on 30 Jun 2009, 11:21 AM
can someone from Telerik comment on whether adding the ability to bind the coverFlow to in-memory images is on the roadmap for the CoverFlow?  The ability to bind to ObservableCollection<BitmapSource> would be ideal.

I have not yet been able to find a work-around for this.  Does anyone have something that works?

Thanks,

jd
0
Rosi
Telerik team
answered on 03 Jul 2009, 07:33 AM
Hi all,

We added this feature in our TO-DO plans for CoverFlow control and we will do our best to implement for futures version of the control.

Thank you for your involvement.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Wolfgang Colsman
Top achievements
Rank 1
answered on 28 Jan 2010, 10:35 PM
Hi Rosi,

I just evaluated 00395RadControls_for_Silverlight4_2009_3_1322_Trial.zip. It still seems not to work.

Do you plan to support in-memory images?

Regards,

Wolfgang
0
Valeri Hristov
Telerik team
answered on 29 Jan 2010, 07:52 AM
Hello Wolfgang,

It should work actually. Problem occurs when you put the images directly in RadCoverFlow, because it attaches a handler to the ImageLoaded event and hides the image, in order to display the "loading" animation. Since the images with in-memory source never fire that event, RadCoverFlow never shows the real image. The workaround is to wrap the Image into a Border or a Grid, for example, which will prevent RadCoverFlow from hiding it automatically. More information can be found in the following thread:

http://www.telerik.com/community/forums/silverlight/coverflow/coverflow-not-work-with-memorystream-why.aspx

Best wishes,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
CoverFlow
Asked by
Ciro
Top achievements
Rank 1
Answers by
Ciro
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Jeremy
Top achievements
Rank 1
Gary Danielson
Top achievements
Rank 1
Rosi
Telerik team
Wolfgang Colsman
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or