Panel Size - ReusableRadCarouselPanel example

3 posts, 0 answers
  1. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 17 Dec 2008 Link to this post

    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. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 17 Dec 2008 Link to this post

    I meant to post this on the WPF forum.. can you move it?
    thanks
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Hristo Deshev
    Admin
    Hristo Deshev avatar
    559 posts

    Posted 29 Dec 2008 Link to this post

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