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

Dock / Zone Highlighting

   
 
Image
 
     
   
 
Image
 
     
   
 
Image
 
     

Arrange the RadDocks from the RadDockZone above in the RadDockZones below.
If you hover the correct RadDockZone, it will be highlighted.

  • HighlightedCssClass

    While dragging a RadDock, if a RadDockZone is hovered over, the RadDockZone gets highlighted. With RadDock it is possible to specify the highlighting style for each docking zone using the HighlightedCssClass property.

    1) If the HighlightedCssClass is set, for example: RadDockZone.HighlightedCssClass="CustomCssClass", the css class HighlightedStyle will be applied to the RadDockZone when the zone is highlighted.

    2) If the HighlightedCssClass is not set, the RadDockZone will not be highlighted while dragging a RadDock over it.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Dock.HighlightedCssClass.DefaultVB" %>
    <%@ 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" />
         <style type="text/css">
            .CustomCssClass{background-color: #c9ecff !important;}
            .RadDock .rdTop,
            .RadDock .rdBottom,
            .RadDock .rdLeft,
            .RadDock .rdRight
            {
                display:none !important
            }
            .rdPlaceHolder{border:0 !important;background:transparent !important}
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
            <qsf:header id="Header1" runat="server" NavigationLanguage="VB" />
            <telerik:RadScriptManager id="ScriptManager" runat="server" />        
            <script type="text/javascript">
            function SetHandleDock(dock, args)
            {
             dock.set_handle(document.getElementById("Handle_" + dock.get_id()));
            }
            </script>
            <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Orientation="Horizontal" Height="220px" Width="560px">
                <telerik:RadDock ID="RadDock1" runat="server" Width="183px" DockMode="Docked"
                ForbiddenZones="RadDockZoneLeft,RadDockZoneRight"
                OnClientInitialize="SetHandleDock"
                DockHandle="None"
                >
                    <contenttemplate>
                         <img id="Handle_RadDock1" alt="Image" src="Images/pic2.jpg"/>
                     </contenttemplate>
                </telerik:RadDock>
                <telerik:RadDock ID="RadDock2" runat="server" Width="183px" DockMode="Docked"
                ForbiddenZones="RadDockZoneCenter,RadDockZoneRight"
                OnClientInitialize="SetHandleDock"
                DockHandle="None">
                    <contenttemplate>
                            <img id="Handle_RadDock2" alt="Image" src="Images/pic1.jpg"/>
                    </contenttemplate>
                </telerik:RadDock>
                <telerik:RadDock ID="RadDock3" runat="server" Width="183px" DockMode="Docked"
                ForbiddenZones="RadDockZoneLeft,RadDockZoneCenter"
                OnClientInitialize="SetHandleDock"
                DockHandle="None">
                    <contenttemplate>                        
                                <img id="Handle_RadDock3" alt="Image" src="Images/pic3.jpg" />
                    </contenttemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>
            <br />
            <qsf:InformationBox ID="InformationBox1" runat="server">
            Arrange the RadDocks from the RadDockZone above in the RadDockZones below.<br />
            If you hover the correct RadDockZone, it will be highlighted.
            </qsf:InformationBox>
            <table><tr><td>
                <telerik:RadDockZone ID="RadDockZoneLeft" runat="server" Height="224px" Width="183px" Skin="Default"
                 HighlightedCssClass="CustomCssClass"
                 style="padding-right:0px;float:left;overflow:hidden">
                </telerik:RadDockZone>
                <telerik:RadDockZone ID="RadDockZoneCenter" runat="server" Height="224px" Width="183px" Skin="Default"
                 HighlightedCssClass="CustomCssClass"
                 style="padding-left:0px;padding-right: 0px;float:left;overflow:hidden">
                </telerik:RadDockZone>
           
                <telerik:RadDockZone ID="RadDockZoneRight" runat="server" Height="224px" Width="183px" Skin="Default"
                HighlightedCssClass="CustomCssClass"
                style="padding-left:0px;float:left;overflow:hidden">
                </telerik:RadDockZone>
            </td></tr></table>
            
            </telerik:RadDockLayout>
            <qsf:footer runat="server" id="Footer1" showcodeviewer="true" />
        </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