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

Render Modes

  • Render mode comparison
Render mode
Classic vs. Light rendering
Classic Lightweight
Markup Size 5.02 KB 5.20 KB
CSS Size 7.2 KB 5.03 KB
Image Sprite Size * 4.13 KB 17.04 KB

This demo showcases the two different rendering modes of Telerik's ASP.NET Dock control: Classic and Lightweight.

  • Classic rendering is the long-standing rendering mode of the control in which its layout is implemented using table elements.
  • Lightweight rendering leverages HTM5 and CSS3 to deliver semantic HTML to the browser, but the control may lose its rounded corners, gradients and shadows in non-modern browsers. With this rendering, some table elements in the control layout are replaced with generic elements, such as div and span.

There is also a Native render mode option inherited directly from RenderMode. As RadDock does not have a specific HTML element, the Native render mode will have the same effect as the Classic one.

The default render mode of the control is Classic and you have the option to either explicitly set it to Lightweight or leverage the Auto mode to have the control choose the best rendering based on the user's browser.

Note: In order to provide optimal experience for your end users, we recommend that you use only one type of render mode for a control on a given page. For example, if you have two instances of RadDock on the page, it will be best if both of them use the same render mode.

Note: The Material skin is available only for the modern Lightweight render mode. Change the skin or the mode to properly visualize the demonstrated control.

Notes on the statistics:
The markup size is calculated automatically in the code-behind by rendering a simple RadDock instance on a blank page.
* - The larger size of the sprite is due to the common spite RadDock uses for its buttons and arrows. A lot of Telerik controls use this sprite, so with more complex pages it will be loaded only once, which will, ultimately, make it more efficient. The Classic RenderMode also performs several requests for image sprites, even if they are smaller in size.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Dock.RenderModes.DefaultVB"CodeFile="DefaultVB.aspx.vb"  %>

<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register Src="~/Dock/Common/TelerikNewsVB.ascx" TagName="News" TagPrefix="uc2" %>
<%@ Register Src="~/Dock/Common/TelerikBlogsVB.ascx" TagName="Blogs" TagPrefix="uc2" %>
<%@ 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" />
</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 size-wide">
        <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
            <table>
                <tr>
                    <td style="vertical-align: top">
                        <telerik:RadDockZone ID="RadDockZone2" runat="server" Orientation="Vertical" Width="250px"
                            MinHeight="400px">
                            <telerik:RadDock RenderMode="Lightweight" ID="RadDock1" runat="server" Title="Blogs" Width="250px" EnableAnimation="true"
                                EnableRoundedCorners="true" Resizable="true" CssClass="higherZIndex">
                                <ContentTemplate>
                                    <uc2:Blogs ID="BlogsControl" runat="server"></uc2:Blogs>
                                </ContentTemplate>
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </td>
                    <td style="vertical-align: top">
                        <telerik:RadDockZone ID="RadDockZone1" runat="server" Orientation="Vertical" Width="520px"
                            MinHeight="400px">
                            <telerik:RadDock RenderMode="Lightweight" ID="RadDock2" runat="server" Title="News" Width="250px" EnableAnimation="true"
                                EnableRoundedCorners="true" Resizable="true" CssClass="higherZIndex">
                                <ContentTemplate>
                                    <uc2:News ID="NewsControl" runat="server"></uc2:News>
                                </ContentTemplate>
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </td>
                </tr>
            </table>
        </telerik:RadDockLayout>
    </div>
    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Render mode comparison">
        <Views>
            <qsf:View>
                <qsf:ConfiguratorColumn runat="server" Size="Narrow" Title="Render mode">
                    <qsf:RadioButtonList ID="cbChooseRenderMode" runat="server" AutoPostBack="True"
                        OnSelectedIndexChanged="cbChooseRenderMode_SelectedIndexChanged"
                        CssClass="fb-group" RepeatLayout="UnorderedList">
                        <asp:ListItem Value="Classic" Selected="True">Classic</asp:ListItem>
                        <asp:ListItem Value="Lightweight">Lightweight</asp:ListItem>
                    </qsf:RadioButtonList>
                </qsf:ConfiguratorColumn>
                <qsf:ConfiguratorColumn runat="server" Size="Wide" Title="Classic vs. Light rendering">
                    <table class="table" cellspacing="0">
                        <thead>
                            <tr>
                                <th></th>
                                <th>Classic</th>
                                <th>Lightweight</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <th>Markup Size</th>
                                <td>
                                    <asp:Label ID="ClassicSize" runat="server"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="LightweightSize" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <th>CSS Size</th>
                                <td>7.2 KB</td>
                                <td>5.03 KB</td>
                            </tr>
                            <tr>
                                <th>Image Sprite Size *</th>
                                <td>4.13 KB</td>
                                <td>17.04 KB</td>
                            </tr>
                        </tbody>
                    </table>
                </qsf:ConfiguratorColumn>



            </qsf:View>
        </Views>
    </qsf:ConfiguratorPanel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance