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

Add Q3 Coverflow to Grid runtime

1 Answer 18 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Henk asked on 05 Nov 2009, 03:42 PM
I try to add a CoverFlow to a grid at runtime.
In the Coverflow Images should be shown.
ItemsSource of the CoverFlow is connected to a collection of objects that have a ImageURL property.
ImageURL value is for instance "/Images/nature1.png"
Images are stored in "ClientBin/Images"

CoverFlow = new RadCoverFlow(){ReflectionStartAlpha=100,  
                               ReflectionRelativeHeight = 0.3,  
                               CameraY = -120,  
                               ItemMaxHeight = 140,  
                               Height = 200 };  
CoverFlow.DisplayMemberPath = "ImageUrl";  
AntwoordCoverFlow.ItemsSource = ImageCollection; 

If I run the application only the ImageURL is shown as text in the CoverFlow.
In the Q2 version I had no problem.
Is an item template mandatory for the items in the CoverFlow in Q3? If yes how can I assign it in code behind. I don't have a XAML file.

1 Answer, 1 is accepted

Sort by
Valeri Hristov
Telerik team
answered on 05 Nov 2009, 03:55 PM
Hi Henk,

Infortunately setting ItemTemplate is mandatory at this time. You could set it from code-behind using XamlReader (in Silverlight you cannot create DataTemplate purely with code) and the string representation of the template XAML. For example:

string data = @"<DataTemplate xmlns="""" xmlns:x=""""><Image Source=""{Binding ImageUrl}"" /></DataTemplate>";

DataTemplate template = (DataTemplate)XamlReader.Load(data);

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.
Asked by
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question