Using the MinimizeZoneElementID Property
The MinimizeZoneElementId property allows you to indicate a form element used to dock dialog windows. When the dialog windows are docked, they will appear similar to windows docked on a task bar. In the following example, you will create a panel control and three dialog windows that dock within that panel control.
Complete the following steps to create three windows that dock within a panel:
1. From the Toolbox add the following controls to your Web page:
• One Panel control
• Three C1Window controls
2. For each C1Window control, open the C1Window Tasks menu from its smart tag and click on the VisualStyle drop-down arrow and select the following schemes:
• Set the C1Window1 scheme to Office2007Black.
• Set the C1Window2 scheme to Office2007Blue.
• Set the C1Window3 scheme to Office2007Silver.
3. Double-click the Web page to create an event handler for the Load event. Enter the following code for the Page_Load event to set the size, style, and location of the controls:
' Set Panel1's size and style.
Panel1.BorderColor = System.Drawing.Color.DarkBlue
Panel1.BorderStyle = BorderStyle.Dashed
Panel1.BorderWidth = 2
Panel1.Height = 112
Panel1.Width = 115
' Show the dialog windows on page load.
C1Window1.ShowOnLoad = True
C1Window2.ShowOnLoad = True
C1Window3.ShowOnLoad = True
' Do not show the status bar.
C1Window1.StatusVisible = False
C1Window2.StatusVisible = False
C1Window3.StatusVisible = False
' Set C1Window1's size and starting position.
C1Window1.Height = 135
C1Window1.Width = 200
C1Window1.StartPosition = C1WindowPosition.Manual
C1Window1.X = 100
C1Window1.Y = 10
' Set C1Window2's size and starting position.
C1Window2.Height = 135
C1Window2.Width = 200
C1Window2.StartPosition = C1WindowPosition.Manual
C1Window2.X = 125
C1Window2.Y = 35
' Set C1Window3's size and starting position.
C1Window3.Height = 135
C1Window3.Width = 200
C1Window3.StartPosition = C1WindowPosition.Manual
C1Window3.X = 150
C1Window3.Y = 60
• C#
// Set Panel1's size and style.
Panel1.BorderColor = System.Drawing.Color.DarkBlue;
Panel1.BorderStyle = BorderStyle.Dashed;
Panel1.BorderWidth = 2;
Panel1.Height = 112;
Panel1.Width = 115;
// Show the dialog windows on page load.
C1Window1.ShowOnLoad = true;
C1Window2.ShowOnLoad = true;
C1Window3.ShowOnLoad = true;
// Do not show the status bar.
C1Window1.StatusVisible = false;
C1Window2.StatusVisible = false;
C1Window3.StatusVisible = false;
// Set C1Window1's size and starting position.
C1Window1.Height = 135;
C1Window1.Width = 200;
C1Window1.StartPosition = C1WindowPosition.Manual;
C1Window1.X = 100;
C1Window1.Y = 10;
// Set C1Window2's size and starting position.
C1Window2.Height = 135;
C1Window2.Width = 200;
C1Window2.StartPosition = C1WindowPosition.Manual;
C1Window2.X = 125;
C1Window2.Y = 35;
// Set C1Window3's size and starting position.
C1Window3.Height = 135;
C1Window3.Width = 200;
C1Window3.StartPosition = C1WindowPosition.Manual;
C1Window3.X = 150;
C1Window3.Y = 60;
4. Add the following code to set the MinimizeZoneElementId property for the C1Window controls:
' Set the MinimizeZoneElementId for each dialog window.
C1Window1.MinimizeZoneElementId = "Panel1"
C1Window2.MinimizeZoneElementId = "Panel1"
C1Window3.MinimizeZoneElementId = "Panel1"
• C#
// Set the MinimizeZoneElementId for each dialog window.
C1Window1.MinimizeZoneElementId = "Panel1";
C1Window2.MinimizeZoneElementId = "Panel1";
C1Window3.MinimizeZoneElementId = "Panel1";
This topic illustrates the following:
• Run the program. The Web page will appear similar to the following:
• Minimize the dialog windows. When minimized, the dialog windows appear docked within the panel control:
|