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

Right-to-Left Support

RadDock fully supports right-to-left (RTL) language locales. RadDocks are created and added to the page as children of the body element and in order to turn on the RTL support you should set dir=rtl to the html or body elements or set the direction:rtl CSS property.

This example uses an iframe for its content area to keep the navigation and the layout of the online demos.
This is why moving a RadDock may cause a scrollbar to appear.

  • Content.aspx
    • Content.aspx
    • DefaultCS.aspx
  • styles.css
  • Languages.xml
<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ 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>RTL RadDock Page</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                Label1.Text = GetLanguage("Arabic", 2);
                Label2.Text = GetLanguage("Farsi", 6);
                Label3.Text = GetLanguage("Hebrew", 2);
            }
        }

        private string GetLanguage(string selectedLanguage, int parCount)
        {
            System.Xml.XmlDocument languageFile = new System.Xml.XmlDocument();
            languageFile.Load(Server.MapPath("Languages.xml"));
            // Get root element ;
            System.Xml.XmlElement languages = languageFile.DocumentElement;
            System.Xml.XmlNode selectedLangNode = languages.SelectSingleNode(selectedLanguage);

            System.Xml.XmlNodeList nodelist = selectedLangNode.SelectNodes("p");
            int count = nodelist.Count < parCount ? nodelist.Count : parCount;
            string text = String.Empty;
            for (int i = 0; i < count; i++)
            {
                text += nodelist[i].OuterXml;
            }
            return text;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
    <telerik:RadFormDecorator RenderMode="Lightweight" ID="FormDecorator1" runat="server" DecoratedControls="default"
        Skin="Web20"></telerik:RadFormDecorator>
    <telerik:RadDockLayout runat="server" ID="RadDockLayout1" Skin="Web20">
        <telerik:RadDockZone runat="server" ID="RadDockZone1" Style="float: left; margin-right: 10px;
            background: #f5f4e8;" Width="250" MinHeight="400">
            <telerik:RadDock RenderMode="Lightweight" runat="server" ID="RadDock1" Title="Arabic" CssClass="higherZIndex">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </ContentTemplate>
            </telerik:RadDock>
        </telerik:RadDockZone>
        <telerik:RadDockZone runat="server" ID="RadDockZone2" Style="float: left; margin-right: 10px;
            background: #f5f4e8;" Width="250" MinHeight="400">
            <telerik:RadDock RenderMode="Lightweight" runat="server" ID="RadDock4" Title="Farsi" CssClass="higherZIndex">
                <ContentTemplate>
                    <asp:Label ID="Label2" runat="server"></asp:Label>
                </ContentTemplate>
            </telerik:RadDock>
        </telerik:RadDockZone>
        <telerik:RadDockZone runat="server" ID="RadDockZone3" Style="float: left; background: #f5f4e8;"
            Width="250" MinHeight="400">
            <telerik:RadDock RenderMode="Lightweight" runat="server" ID="RadDock2" Title="Hebrew" CssClass="higherZIndex">
                <ContentTemplate>
                    <asp:Label ID="Label3" runat="server"></asp:Label>
                </ContentTemplate>
            </telerik:RadDock>
        </telerik:RadDockZone>
    </telerik:RadDockLayout>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance