<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="_Default" validateRequest="false" %>

<%@ Register Assembly="MindFusion.Diagramming.WebForms" Namespace="MindFusion.Diagramming.WebForms" TagPrefix="ndiag" %>
    
<!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>MindFusion NetDiagram Sample - Tree Map Layout</title>
  <link href="common/jquery-ui.min.css" rel="stylesheet" />
  <link href="common/samples.css" rel="stylesheet" />
  <script type="text/javascript" src="common/jquery.min.js"></script>
  <script type="text/javascript" src="common/jquery-ui.min.js"></script>
  <script type="text/javascript" src="common/samples.js"></script>
  <style type="text/css">
    #legend
    {
	    background-image: url('legend-backgr.png');
	    background-repeat: repeat-y;
	    border: 1px solid Black;
	    width: 100px;
	    height: 15px;
	    margin-right: 10px;
    }
  </style>
</head>
<body>
<form id="form1" runat="server">

  <asp:ScriptManager ID="ScriptManager1" runat="server" />

  <div id="header" style="height: 49px;">
    <div style="float: left; margin-right: 5px;">
		  <span class="label">Weigh by:</span>
      <asp:DropDownList ID="ddlWeight" runat="server" AutoPostBack="True">
        <asp:ListItem>Population</asp:ListItem>
        <asp:ListItem Selected="True">Area</asp:ListItem>
      </asp:DropDownList>
    </div>
    <div style="float: left; margin-right: 5px;">
		  <span class="label">Color by:</span>
      <asp:DropDownList ID="ddlColor" runat="server" AutoPostBack="True">
        <asp:ListItem Selected="True">Population</asp:ListItem>
        <asp:ListItem>Area</asp:ListItem>
      </asp:DropDownList>
    </div>
    <div style="float: left;">
      <span class="label">Legend:</span>
      <div id="legend"></div>
      <div>
				<span style="float: left; position: relative;">High</span>
				<span style="float: right; padding-right:10px; position: relative;">Low</span>
      </div>
    </div>
    <div style="float: right; margin-right: 5px; margin-top: 17px;">
      <button id="expandButton" onclick="onExpandCollapse()">&gt;</button>
    </div>
	</div>

  <div id="info" style="top: 60px; bottom: 24px;">
    <div id="infoTab" style="padding: 10px;">
      <h1>About this sample</h1>
      <p>This sample shows how to arrange the Diagram by using the TreeMapLayout algorithm.</p>
      <p>Choose different options to assign weights and note how the layout changes.</p>
    </div>
  </div>

  <div id="content" style="top: 60px; bottom: 24px;">
    <ndiag:DiagramView ID="diagramView" runat="server" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"
      ClientSideMode="Canvas" JsLibraryLocation="MindFusion.Diagramming.js" />
  </div>

  <div id="footer" style="height: 24px;">
    <span id="copyright"></span>
  </div>

</form>

<script type="text/javascript">
  $('select').on("selectmenuchange", function () {
    __doPostBack();
  });
</script>

</body>
</html>
