ComponentOne DashboardLayout for WinForms
C1DashboardLayout Class
Members 

C1.Win.Layout Namespace : C1DashboardLayout Class
The C1DashboardLayout is a layout control that lets you design dynamic screens and dashboards.
Object Model
C1DashboardLayout ClassDashboardCollection ClassDashboardItem ClassDashboardOptions ClassDashboardTheme Class
Syntax
'Declaration
 
Public Class C1DashboardLayout 
   Inherits System.Windows.Forms.Control
public class C1DashboardLayout : System.Windows.Forms.Control 
Remarks

The C1DashboardLayout class allows you to define the behavior of the DashboardLayout control with the help of following options:

Example

This example instantiates the object of C1DashboardLayout and shows its basic implementation with various options mentioned above.

private void InitializeDashboardLayout()
{
     //Initialize the DashboardLayout Control
     C1DashboardLayout c1DashboardLayout1 = new C1.Win.Layout.C1DashboardLayout(); 
     c1DashboardLayout1.Dock = DockStyle.Fill;
     //Setting the type of layout through C1DashboardLayout's LayoutType property.
     c1DashboardLayout1.LayoutType = C1.Win.Layout.LayoutType.Flow;
     //Adding child containers and controls to the DashboardLayout
     c1DashboardLayout1.Items.Add(Guid.NewGuid().ToString(), new List<Control>() { new Button() { Text = "New Button", Location = new Point(10, 10) } });
     c1DashboardLayout1.Items.Add(Guid.NewGuid().ToString(), new List<Control>() { new Label() { Text = "New Label", Location = new Point(10, 10) } });
     //Removing child container from the DashboardLayout
     c1DashboardLayout1.Items.Remove(c1DashboardLayout1.Items[1].Id);
     //Adding header to the child container
     c1DashboardLayout1.SetCaption(c1DashboardLayout1.Items[0].ItemContainer,"First Child Container");
     //Sets the minimum and maximum size to which the child containers can be resized
     c1DashboardLayout1.Options.MinimumItemContainerSize = new System.Drawing.Size(100, 100);
     c1DashboardLayout1.Options.MaximumItemContainerSize = new System.Drawing.Size(500, 500);
     //Maximizes the specified child container
     c1DashboardLayout1.Maximize(c1DashboardLayout1.Items[0]);
     //Restores the maximized child container
     c1DashboardLayout1.Restore();
     //Gets the selected child container
     DashboardItem selectedItem=c1DashboardLayout1.GetSelectedItem();
     //Styling the tool-icon
     c1DashboardLayout1.Styles.ItemContainer.ToolIcon = Properties.Resources.ToolIcon;
     c1DashboardLayout1.Styles.ItemContainer.ToolIconColor = Color.Green;

     //Sets the position of the tool-icon to upper left corner of the child containers
     c1DashboardLayout1.Options.ToolIconAppearance = ToolIconAppearance.UpperLeft;
     //Customizes the context menu strip which is shown on the click of the tool-icon
     c1DashboardLayout1.Options.ContextMenuStrip = contextMenuStrip1;
     this.Controls.Add(c1DashboardLayout1);
}
private void LoadDashboardLayout()
{
     //Loads the layout properties from an XML file.
     c1DashboardLayout1.LoadLayout("DashboardLayout.xml");
            
}
private void SaveDashboardLayout()
{
     //Saves the layout properties to an XML file.
     c1DashboardLayout1.SaveLayout("DashboardLayout.xml");
}
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            C1.Win.Layout.C1DashboardLayout

See Also

Reference

C1DashboardLayout Members
C1.Win.Layout Namespace