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

Panel Size - ReusableRadCarouselPanel example

2 Answers 78 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 17 Dec 2008, 01:25 PM
Hi..
How do I enlarge the panel size?
Say for instance - want to increase the carousel items to  500 x 500 for all items in the data template?
thanks again!

2 Answers, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 17 Dec 2008, 01:28 PM
I meant to post this on the WPF forum.. can you move it?
thanks
0
Hristo Deshev
Telerik team
answered on 29 Dec 2008, 09:24 AM
Hi Jon,

The easiest way to achieve this is to define a global CarouselItem style that would set the Width and Height properties. There is a small catch though: the default CarouselItem style defines a MaxHeight setting that will cause an item of height 500 to get clipped. To get around this, you would have to set MaxHeight to 500 as well. Here is a XAML snippet that does that:

<telerik:RadCarousel Name="RadCarousel1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
    <telerik:RadCarousel.Resources> 
        <Style TargetType="telerik:CarouselItem"
            <Setter Property="Width" Value="500" /> 
            <Setter Property="Height" Value="500" /> 
            <Setter Property="MaxHeight" Value="500" /> 
        </Style> 
    </telerik:RadCarousel.Resources> 
</telerik:RadCarousel> 
 

I am attaching a sample project with 500x500 carousel items.





Best wishes,
Hristo Deshev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Carousel
Asked by
Jon
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Hristo Deshev
Telerik team
Share this question
or