Beta CoverFlow - DisplayMemberPath

4 posts, 0 answers
  1. Larry
    Larry avatar
    22 posts
    Member since:
    Jun 2009

    Posted 10 Oct 2009 Link to this post

    Hi,

    I have tried many(!) techniques and variations but am unable to bind my CoverFlow to a collection.  Any assistance would be welcome.  I don't want to paste a ton of code so hopefully this will be enough to illustrate my situation.  I just have to think I'm missing something basic.  Thanks in advance for any insights...

     

            <telerikNavigation:RadCoverFlow x:Name="calendarCovers" Background="Transparent" 
                                            OffsetY="20"   
                                            CameraViewpoint="Center" 
                                            RotationY="40"   
                                            ItemScale="0.85"   
                                            ItemWidth="225"   
                                            ItemHeight="176" Grid.Row="2"  Grid.ColumnSpan="3" OffsetX="-20" ContentType="Image" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-20,0,0" > 
            </telerikNavigation:RadCoverFlow> 
     

     

                context = new CanvasByNatureDomainContext();  
                EntityQuery<Calendar> query = context.GetCalendarsQuery();  
                context.Load<Calendar>(query).Completed += (sender, args) =>  
                {  
                    List<Calendar> calendarList = ((LoadOperation<Calendar>)sender).Entities.ToList();  
                      
                    // THIS WORKS...  
                    foreach (Calendar c in calendarList)  
                    {  
                        calendarCovers.Items.Add(c.ImagePath);  
                    }  
     
                    // THIS DOES NOT WORK (my images are not displayed, though I get the correct number of 'loading' images)  
                    //foreach (Calendar c in calendarList)  
                    //{  
                    //    calendarCovers.Items.Add(c);  
                    //}  
                    //calendarCovers.DisplayMemberPath = "ImagePath";  
     
                    // THIS DOES NOT WORK (my images are not displayed, though I get the correct number of 'loading' images)  
                    //calendarCovers.ItemsSource = calendarList;  
                    //calendarCovers.DisplayMemberPath = "ImagePath";  
     
                    // THIS DOES NOT WORK (my images are not displayed, though I get the correct number of 'loading' images)  
                    //Add to XAML: ItemsSource="{Binding}"  
                    //calendarCovers.DataContext = calendarList;  
                    //calendarCovers.DisplayMemberPath = "ImagePath";  
                };  
     

     

  2. Hristo Borisov
    Admin
    Hristo Borisov avatar
    298 posts

    Posted 11 Oct 2009 Link to this post

    Hi Larry,

    What does the collection you are trying to bind consists of? We haven't experienced any problems binding our RadCoverFlow to a collection, in fact our online demos have an example that demonstrates similar scenario. If you want to bind your RadCoverFlow to a collection of images please read here how to use the ContentType property. I hope this will resolve your issue.

    Sincerely yours,
    Hristo Borisov
    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.
  3. DevCraft banner
  4. Larry
    Larry avatar
    22 posts
    Member since:
    Jun 2009

    Posted 11 Oct 2009 Link to this post

    The big difference is that your samples do not use the DisplayMemberPath property.  I am using a DomainDataSource.  Each object in the collection has several properties, one of which - 'ImagePath' - is the one containing the string pointing to an image.

    The scenario I have working is similar to yours - that is, a 'collection' of strings is passed to the CoverFlow control (so the DisplayMemberPath property is not needed).

    Once I have a collection containing objects more complex than simple strings I am unable to get the images to display in a CoverFlow.

    The scenario I have working proves that the images are being properly referenced and found (and at least ostensibly displayed with the correct ContentType).

    Can you give me a working example where the CoverFlow is being fed a collection of objects - and where the DisplayMemberPath property specifies the image to display?  Using the DisplayMemberPath property this way should work - right?

    Thanks!

    -ldl-
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 16 Oct 2009 Link to this post

    Hello Larry,

    The current beta version of RadCoverFlow cannot be used with DisplayMemberPath. The good news is that we will fix this for the official Q3 release in the beginning of November.

    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