<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="ClientAPI._Default" %>

<%@ Register Assembly="RadDock.Net2" Namespace="Telerik.WebControls" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>Untitled Page</title>
</head>
<body>
  <form id="form1" runat="server">

<script type="text/javascript">
//<!--
function ClientCommand (dockObj, command)
{
  if (command.Name == "Close")
  {
    var zone = dockObj.ParentDockingZone;
    if (zone != null)
    {
        var fullName = zone.id + "-" + dockObj.TitleBar.innerText;         
        if (confirm("Are you sure you want to close " + fullName + "?"))
        {
          dockObj.Hide(); 
        }
    }
  }
}      
//-->        
</script>

    <cc1:RadDockingManager ID="RadDockingManager1" runat="server" />
    <table width="500px">
      <tr>
        <td colspan="2" style="width: 100%; height: 75px">
          <cc1:RadDockingZone ID="zoneTop" runat="server" Width="100%" Height="100%">
            <cc1:RadDockableObject ID="rdoTop" runat="server" Text="Top">
              <ContentTemplate>
                Various content
                <asp:Button ID="Button1" runat="server" Text="Button" />
                <asp:CheckBox ID="CheckBox1" runat="server" />
              </ContentTemplate>
              <Commands>
                <cc1:RadDockableObjectCommand Enabled="False" Name="Expand" ToolTip="Expand" />
                <cc1:RadDockableObjectCommand Name="Collapse" ToolTip="Collapse" />
                <cc1:RadDockableObjectCommand Name="Close" ToolTip="Close" 
                  OnClientCommand="ClientCommand" />
              </Commands>
            </cc1:RadDockableObject>
          </cc1:RadDockingZone>
        </td>
      </tr>
      <tr>
        <td style="width: 50%; height: 75px">
          <cc1:RadDockingZone ID="zoneLeft" runat="server" Width="100%" Height="100%">
            <cc1:RadDockableObject ID="rdoLeft" runat="server" Text="Left">
              <ContentTemplate>
                Various content
                <asp:ListBox ID="ListBox1" runat="server">
                  <asp:ListItem>Red</asp:ListItem>
                  <asp:ListItem>Blue</asp:ListItem>
                  <asp:ListItem>Green</asp:ListItem>
                </asp:ListBox>
              </ContentTemplate>
              <Commands>
                <cc1:RadDockableObjectCommand Enabled="False" Name="Expand" ToolTip="Expand" />
                <cc1:RadDockableObjectCommand Name="Collapse" ToolTip="Collapse" />
                <cc1:RadDockableObjectCommand Name="Close" ToolTip="Close" 
                  OnClientCommand="ClientCommand" />
              </Commands>
            </cc1:RadDockableObject>
          </cc1:RadDockingZone>
        </td>
        <td style="width: 50%; height: 75px">
          <cc1:RadDockingZone ID="zoneRight" runat="server" Width="100%" Height="100%">
            <cc1:RadDockableObject ID="rdoRight" runat="server" Text="Right">
              <ContentTemplate>
                Various content &nbsp;
                <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                  <asp:ListItem Selected="True">Today</asp:ListItem>
                  <asp:ListItem>Tomorrow</asp:ListItem>
                  <asp:ListItem>Yesterday</asp:ListItem>
                </asp:RadioButtonList>
              </ContentTemplate>
              <Commands>
                <cc1:RadDockableObjectCommand Enabled="False" Name="Expand" ToolTip="Expand" />
                <cc1:RadDockableObjectCommand Name="Collapse" ToolTip="Collapse" />
                <cc1:RadDockableObjectCommand Name="Close" ToolTip="Close" 
                  OnClientCommand="ClientCommand" />
              </Commands>
            </cc1:RadDockableObject>
          </cc1:RadDockingZone>
        </td>
      </tr>
      <tr>
        <td colspan="2" style="width: 100%; height: 75px">
          <cc1:RadDockingZone ID="zoneBottom" runat="server" Width="100%" Height="100%">
            <cc1:RadDockableObject ID="rdoBottom" runat="server" Text="Bottom">
              <ContentTemplate>
                Various content &nbsp;
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.telerik.com">http://www.telerik.com
                </asp:HyperLink>
              </ContentTemplate>
              <Commands>
                <cc1:RadDockableObjectCommand Enabled="False" Name="Expand" ToolTip="Expand" />
                <cc1:RadDockableObjectCommand Name="Collapse" ToolTip="Collapse" />
                <cc1:RadDockableObjectCommand Name="Close" ToolTip="Close" 
                  OnClientCommand="ClientCommand" />
              </Commands>
            </cc1:RadDockableObject>
          </cc1:RadDockingZone>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
