New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Custom CSS Classes

  • Custom cssClass
  • Custom Clicked Item
  • Custom Focused Item
  • Custom Hovered Item
  • Custom Checked Button
  • Custom Disabled Item

You can customize the appearance of the RadToolBar items by specifying custom defined CSS classes. The following CSS classes are available:

  • CssClass - it is always applied regardless the item state
  • DisabledCssClass - used when the item is disabled (Enabled = false)
  • FocusedCssClass - used when the item is focused after tabbing to it with the keyboard
  • ClickedCssClass - used when the left mouse key is pressed over the item
  • HoveredCssClass - used when the mouse cursor is over the item
  • CheckedCssClass - used when a button checked state is true (applies only to RadToolBarButton)
  • DefaultVB.aspx
  • styles.css
<%@ Page AutoEventWireup="true" Inherits="Telerik.QuickStart.QsfPage"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container">
        <telerik:RadToolBar RenderMode="Lightweight" runat="server" ID="RadToolBar2">
            <Items>
                <telerik:RadToolBarButton CssClass="CustomItem" Text="Custom cssClass">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton ClickedCssClass="CustomClickedItem" Text="Custom Clicked Item">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton FocusedCssClass="CustomFocusedItem" Text="Custom Focused Item">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton HoveredCssClass="CustomHoveredItem" Text="Custom Hovered Item">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton CheckedCssClass="CustomCheckedButton" Text="Custom Checked Button"
                    CheckOnClick="true" Checked="true" AllowSelfUnCheck="true">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton DisabledCssClass="CustomDisabledItem" Text="Custom Disabled Item"
                    Enabled="false">
                </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance