Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Rotator / First Look

Configure RadRotator
Direction
RotatorType
AnimationType*
ScrollDuration
FrameDuration
Width (px)
ItemWidth (px)
Height (px)
ItemHeight (px)
WrapFrames

  • * The SlideShowAnimation-Type property takes effect only when RotatorType property is set to SlideShow or SlideShowButtons

    If one of the RadRotator's buttons' type is used, then the Width property for a horizontal rotator (Height for vertical rotator) should be set to be 40px bigger (the buttons have dimensions: 20x20 pixels) than the value set for a rotator in nonbutton mode. More details about RadRotator's configuration can be found in this help article.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="c#" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Rotator.Default.DefaultCS"
        CodeFile="DefaultCS.aspx.cs" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server" />
        <style type="text/css">
            .item
            {
                border: solid 1px #dff3ff;
                margin: 4px;
            }
            
            .coverFlowRotator .item, .carouselRotator .item
            {
                border: 0px;
                margin: 0px;
            }
            
            .rotatorBackground
            {
                background-image: url('Images/fl_back.jpg');
                float: left;
                margin-left: 50px;
                margin-top: 15px;
                width: 480px;
                height: 370px;
                border: solid 2px #dedede;
                font-family: Arial;
                -moz-border-radius: 15px;
                -webkit-border-radius: 15px;
                _margin-left: 25px; /* IE6 hack*/
                _margin-top: 7px; /* IE6 hack*/
            }
            .verticalRotator
            {
                margin-left: auto;
                margin-right: auto;
                width: 370px;
                height: 370px;
            }
            .horizontalRotator
            {
                margin-top: 110px;
                margin-left: auto;
                margin-right: auto;
                width: 370px;
                height: 370px;
            }
            div.horizontalCarousel
            {
                margin-top: 20px;
            }
            .mainDiv
            {
                width: 100%;
                height: 420px;
            }
            .configurationPanel
            {
                width: 270px;
                height: 330px;
                border: 0px;
                display: inline;
                float: right;
            }
            .propertyRow
            {
                margin-bottom: 5px;
            }
            .propertyName
            {
                float: left;
                width: 90px;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="c#" />
        <telerik:RadScriptManager ID="ScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1"
            EnableAJAX="false">
            <div class="mainDiv">
                <div class="rotatorBackground">
                    <telerik:RadRotator ID="RadRotator1" runat="server" Width="330px" Height="120px"
                        CssClass="horizontalRotator" ScrollDuration="500" FrameDuration="2000" ItemHeight="120"
                        ItemWidth="110">
                        <ItemTemplate>
                            <img class="item" src='<%# Page.ResolveUrl("~/Rotator/Img/Northwind/Customers/Thumbs/") + Container.DataItem %>.jpg'
                                alt="Customer Image" />
                        </ItemTemplate>
                    </telerik:RadRotator>
                </div>
                <div>
                    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Enabled="true" Title="Configure RadRotator"
                        Expanded="true" CssClass="configurationPanel" HorizontalAlign="Left" Width="300">
                        <div class="configurationPanel">
                            <div class="propertyRow">
                                <div class="propertyName">
                                    Direction
                                </div>
                                <div>
                                    <asp:DropDownList runat="server" ID="ScrollDirection" Style="width: 150px;">
                                        <asp:ListItem Selected="true" Value="Horizontal">Horizontal</asp:ListItem>
                                        <asp:ListItem Value="Vertical">Vertical</asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    RotatorType
                                </div>
                                <div>
                                    <asp:DropDownList runat="server" ID="RadRotatorType" Style="width: 150px;">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    AnimationType<span style="color: Red">*</span>
                                </div>
                                <div>
                                    <asp:DropDownList runat="server" ID="RadRotatorAnimationType" Style="width: 150px;">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    ScrollDuration
                                </div>
                                <div>
                                    <asp:TextBox runat="server" ID="ScrollDuration" Columns="5" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    FrameDuration
                                </div>
                                <div>
                                    <asp:TextBox runat="server" ID="FrameDuration" Columns="5" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    Width (px)
                                </div>
                                <div>
                                    <asp:TextBox runat="server" ID="txtWidth" Columns="5" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    ItemWidth (px)
                                </div>
                                <div>
                                    <asp:TextBox runat="server" ID="ItemWidth" Columns="5" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    Height (px)</div>
                                <div>
                                    <asp:TextBox runat="server" ID="txtHeight" Columns="5" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    ItemHeight (px)
                                </div>
                                <div>
                                    <asp:TextBox runat="server" ID="ItemHeight" Columns="5" />
                                </div>
                            </div>
                            <div class="propertyRow">
                                <div class="propertyName">
                                    WrapFrames
                                </div>
                                <div>
                                    <asp:CheckBox runat="server" ID="WrapFrames" />
                                </div>
                            </div>
                            <div style="margin-left: auto; margin-right: auto; margin-top: 20px; width: 150px;">
                                <asp:Button ID="Button1" runat="server" Text="Configure Rotator" OnClick="ConfigureRotator" />
                            </div>
                        </div>
                    </qsf:ConfiguratorPanel>
                </div>
            </div>
            <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"
                Skin="Windows7" EnableRoundedCorners="true" />
        </telerik:RadAjaxPanel>
        <qsf:Footer runat="server" ID="Footer1" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451