Binding coverFlow to in memory images...

9 posts, 0 answers
  1. Ciro
    Ciro avatar
    2 posts
    Member since:
    Jul 2008

    Posted 28 May 2009 Link to this post

    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.
  2. Ciro
    Ciro avatar
    2 posts
    Member since:
    Jul 2008

    Posted 28 May 2009 Link to this post

    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?

     

  3. DevCraft banner
  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 01 Jun 2009 Link to this post

    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.
  5. Jeremy
    Jeremy avatar
    9 posts
    Member since:
    May 2009

    Posted 29 Jun 2009 Link to this post

    have you had any luck with this?  I'm trying to do the same thing...

    Thanks,

    jd
  6. Gary Danielson
    Gary  Danielson avatar
    1 posts
    Member since:
    May 2009

    Posted 29 Jun 2009 Link to this post

    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. 

  7. Jeremy
    Jeremy avatar
    9 posts
    Member since:
    May 2009

    Posted 30 Jun 2009 Link to this post

    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
  8. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 03 Jul 2009 Link to this post

    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.
  9. Wolfgang Colsman
    Wolfgang Colsman avatar
    5 posts
    Member since:
    Jan 2010

    Posted 28 Jan 2010 Link to this post

    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
  10. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 29 Jan 2010 Link to this post

    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.
Back to Top
DevCraft banner