DashboardLayout for WinForms | ComponentOne
C1.Win.Layout Namespace / C1DashboardLayout Class / Items Property

In This Topic
    Items Property (C1DashboardLayout)
    In This Topic
    Returns collection of DashbordItem instances of currently selected layout.
    Syntax
    'Declaration
     
    
    Public ReadOnly Property Items As DashboardCollection
    public DashboardCollection Items {get;}
    Remarks
    This property is of DashboardCollection type. DashboardCollection is a class which provides methods to add/remove the child containers to/from DashboardLayout control. Hence, this property enables the users to add/remove items to/from the DashboardLayout control.
    Example
    //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);
    
    See Also