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

Slider / Custom Skins

Transparent Slider Skin

PlayBall Slider Skin

Wooden Slider Skin

Black Slider Skin


  • RadSlider Custom Skins

    This is a sample application scenario, which shows how RadSlider control would look like if you choose to use a custom skin. Tutorial: Creating a Custom Skin will guide you through the process of creating custom skin.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="c#" AutoEventWireup="false" Inherits="Telerik.Web.Examples.Slider.CustomSkins.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" />
        <link href="Skins/TransSkin/Slider.Trans.css" rel="stylesheet" type="text/css" />
        <link href="Skins/WoodenSkin/Slider.Wood.css" rel="stylesheet" type="text/css" />
        <link href="Skins/BlackSkin/Slider.BVS.css" rel="stylesheet" type="text/css" />
        <link href="Skins/PlayBallSkin/Slider.PBS.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
            .SlidesWrap
            {
                height: 170px;
            }
            .SlidesWrap h3
            {
                color: #005d6e;
                border-bottom: 1px solid #b2ced3;
                padding-bottom: 3px;
                font-style: normal;
                font-size: 12px;
            }
            .TransWrapper
            {
                position: relative;
                margin: 50px auto 0;
            }
            .TransWrapper, .innerTrans
            {
                height: 75px;
                width: 427px;
            }
            .innerTrans
            {
                position: absolute;
                top: 0;
                left: 0;
                background: url(Skins/TransSkin/images/transBgr.gif) no-repeat;
            }
            .SliderWoodWrapper
            {
                width: 255px;
                height: 83px;
                margin: 30px auto 0;
                padding: 40px 0 0 55px;
                background: url(Skins/WoodenSkin/images/woodBgr.gif) no-repeat;
            }
            .SliderBlackWrapper
            {
                background: url(Skins/BlackSkin/images/BVSBgr.gif) no-repeat;
                width: 385px;
                height: 98px;
                margin: 40px auto 0;
                padding: 30px 0 0 8px;
            }
            .PlayBallWrapper
            {
                width: 375px;
                height: 30px;
                margin: 70px auto 0;
                padding: 10px 0 0;
                overflow: auto;
            }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="c#" ShowSkinChooser="false" />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <div class="SlidesWrap">
            <h3>Transparent Slider Skin</h3>
            <div class="TransWrapper">
                <div id="sliderWrapper1" class="innerTrans" style="z-index: 1; background-color: #f00;">
                </div>
                <div id="sliderWrapper2" class="innerTrans" style="z-index: 0;">
                </div>
                <telerik:RadSlider ID="TransSlider" runat="server" Height="18px" Width="370px" AnimationDuration="1"
                    EnableEmbeddedSkins="false" Value="60" Skin="Trans" Style="position: absolute;
                    top: 30px; left: 28px; z-index: 2;">
                </telerik:RadSlider>
            </div>
        </div>
        <div class="SlidesWrap">
            <h3>PlayBall Slider Skin</h3>
            <div class="PlayBallWrapper">
                <telerik:RadSlider ID="PlayBallSlider" runat="server" Height="25px" Width="370px"
                    AnimationDuration="1" EnableEmbeddedSkins="false" Skin="PBS">
                </telerik:RadSlider>
            </div>
        </div>
        <div class="SlidesWrap">
            <h3>Wooden Slider Skin</h3>
            <div class="SliderWoodWrapper">
                <telerik:RadSlider ID="WoodSlider" runat="server" Height="26px" Width="201px" AnimationDuration="0"
                    MinimumValue="0" MaximumValue="100" Value="30" EnableEmbeddedSkins="false" Skin="Wood">
                </telerik:RadSlider>
            </div>
        </div>
        <div class="SlidesWrap">
            <h3>Black Slider Skin</h3>
            <div class="SliderBlackWrapper">
                <telerik:RadSlider ID="BVS" runat="server" Height="45px" Width="370px" AnimationDuration="1"
                    EnableEmbeddedSkins="false" Skin="BVS">
                </telerik:RadSlider>
            </div>
        </div>

        <script type="text/javascript">
            var $ = $telerik.$;
            var color = { r: 255, g: 0, b: 0 };
            var propertyToDecrement = "r";
            var propertyToIncrement = "g";
            var div1 = $get("sliderWrapper1");
            var div2 = $get("sliderWrapper2");

            Sys.Application.add_load(function SetBackgroundColor() { Sys.Application.remove_load(SetBackgroundColor); IterateLight(); });

            function IterateLight() {
                var div = $(div2).css({ 'background-color': rgbToHex(color), 'opacity': '0', 'z-index': '1' });
                $(div1).css("z-index:0");

                color[propertyToDecrement] -= 1;
                color[propertyToIncrement] += 1;

                if (color[propertyToDecrement] == 0) {
                    propertyToDecrement = (propertyToDecrement == "r") ? "g" : ((propertyToDecrement == "g") ? "b" : "r");
                    propertyToIncrement = (propertyToIncrement == "g") ? "b" : ((propertyToIncrement == "b") ? "r" : "g");
                }

                var temp = div1;
                div1 = div2;
                div2 = temp;

                var endDelegate = Function.createDelegate(this, IterateLight);
                div.fadeTo(10, 1, endDelegate);
            }

            function rgbToHex(rgb) {
                var hexValue = "#";
                var colorReplace = function (val) {
                    var newVal = parseInt(val, 10).toString(16);
                    hexValue = hexValue + (newVal.length == 1 ? "0" + newVal : newVal);
                };
                colorReplace(rgb.r);
                colorReplace(rgb.g);
                colorReplace(rgb.b);
                colorReplace = null;
                return hexValue;
            }
        </script>

        <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