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

Setting style for CoverFlow

1 Answer 36 Views
CoverFlow
This is a migrated thread and some comments may be shown as answers.
Anj
Top achievements
Rank 1
Anj asked on 17 Aug 2010, 01:01 PM
I have a RadCoverFlow control which contains an itemtemplate with an Image and a TextBlock. I need to set style for Image and TextBlock at runtime. I will load my styles at runtime and then I need to set the style in the code behind.

I created a style for ListBoxItem and defined fontsize, fontweight etc and when I set this to coverFlow.ItemContainerStyle, I can see the style applied to the text. How do I achieve the same thing for images? Say, I want all images to be of the same size, how do I achieve this?

1 Answer, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 20 Aug 2010, 09:06 AM
Hello Ana,

Perhaps you can create an ItemContainerStyle based on CoverflowItem instead of ListBoxItem which will be one step closer to the right solution. As for the size of the images you can apply ItemTemplate on the CoverFlow. In that ItemTemplate you can position the text and the image and set fixed Width and Height for the image.

I am not sure I understand what do you mean by "Set style at runtime". When are you going to apply that style? Is it going to be different for the different images? If you are using MVVM and the ItemsSource of the RadCoverflowItem than you can create a Width and Height properties on the view model items and bind the Image's Width and Height to the view model Width and Height pretty much as you would bind the Image's Source.

Greetings,
Panayot
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
CoverFlow
Asked by
Anj
Top achievements
Rank 1
Answers by
Pana
Telerik team
Share this question
or