Code

4 posts, 0 answers
  1. Fred
    Fred avatar
    53 posts
    Member since:
    Aug 2011

    Posted 10 Oct 2014 Link to this post

    Do you have sample code to do the skin change and display the color sample like in this screen shot?
  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 15 Oct 2014 Link to this post

    Hi Fred,

    Actually this is RadRotator, but the RadSkinManager is used to change the skin on item click.

    <telerik:RadRotator ID="QsfSkinRotator" runat="server" FrameDuration="3000" AutoPostBack="true"
        RotatorType="Buttons" Height="87px" ItemHeight="87px" Width="100%" ItemWidth="105px"
        OnItemClick="QsfSkinRotator_OnItemClick" Skin="Default" WrapFrames="false" EnableDragScrolling="true"
        Style="margin-left: 0;"
        EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
        <ItemTemplate>
            <a href="#" title="" class="qsf-rotator-link"><span class="qsf-rotator-thumbs qsf-rotator-<%# Container.DataItem %>"> </span>
                <asp:Label ID="SkinName" runat="server" CssClass="qsf-rotator-skin" Text="<%# Container.DataItem %>" />
            </a>
        </ItemTemplate>
        <ControlButtons LeftButtonID="leftArrow" RightButtonID="rightArrow" />
    </telerik:RadRotator>

    Code Behind:

    protected void QsfSkinRotator_OnItemClick(object sender, RadRotatorEventArgs e) {
        var selectedSkinName = (e.Item.FindControl("SkinName") as Label).Text;
        QsfSkinManager.Skin = selectedSkinName;  //Set the skin on RadSkinManager
    }


    Please note this code is part of the examples, which I hope you have installed already.

    I hope this helps.

    Regards,
    Galin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fred
    Fred avatar
    53 posts
    Member since:
    Aug 2011

    Posted 15 Oct 2014 in reply to Galin Link to this post

    where do I find these examples? I looked at demo code but this routine was not there.
  5. Galin
    Admin
    Galin avatar
    526 posts

    Posted 20 Oct 2014 Link to this post

    Hello Fred,

    The provided code-snippet is part of the files:
    Installation Folder\Telerik.Web.Examples\Common\UserControls\SkinChooser.ascx
    Installation Folder\Telerik.Web.Examples\Common\UserControls\SkinChooser.ascx.cs

    I hope this helps.

    Regards,
    Galin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top