I created this using dynamic RadSplitter creation with recursion:
http://imgur.com/uiWfq
Use the following code to recreate this masterpiece:
(use at own risk)
http://imgur.com/uiWfq
Use the following code to recreate this masterpiece:
(use at own risk)
Imports Telerik.Web.UI |
Partial Class _Default |
Inherits System.Web.UI.Page |
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) |
MyBase.OnLoad(e) |
F(ph) |
End Sub |
Private Sub F(ByVal pane As Control, Optional ByVal limit As Integer = 10) |
If limit <= 0 Then |
Dim blah As New Literal() |
blah.Text = " " |
pane.Controls.Add(blah) |
Exit Sub |
End If |
If TypeOf pane Is WebControl Then |
Dim rand As New Random(pane.GetHashCode) |
Dim r As Integer = rand.Next(100, 255) |
Dim g As Integer = rand.Next(10, 255) |
Dim b As Integer = rand.Next(50, 255) |
CType(pane, WebControl).BackColor = System.Drawing.Color.FromArgb(r, g, b) |
End If |
Dim splitter As New RadSplitter() |
splitter.Orientation = If(limit Mod 2 = 0, Orientation.Horizontal, Orientation.Vertical) |
splitter.PanesBorderSize = 0 |
Dim leftPanel As New RadPane() |
leftPanel.Scrolling = SplitterPaneScrolling.None |
F(leftPanel, limit - 1) |
splitter.Items.Add(leftPanel) |
Dim rightPanel As New RadPane() |
rightPanel.Scrolling = SplitterPaneScrolling.None |
F(rightPanel, limit - 1) |
splitter.Items.Add(rightPanel) |
Dim spacing As New Panel() |
spacing.Style.Add("padding", "5px") |
spacing.Controls.Add(splitter) |
pane.Controls.Add(spacing) |
End Sub |
End Class |
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> |
<!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"> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager runat="server" /> |
<asp:PlaceHolder runat="server" ID="ph" /> |
</form> |
</body> |
</html> |