Table of Contents

Property HideContentsWhenNoFormDesignerIsSet

Namespace
Alternet.FormDesigner.WinForms
Assembly
Alternet.FormDesigner.v9.dll

HideContentsWhenNoFormDesignerIsSet

Gets or sets a boolean value indicates whether toolbox control should display it's content when FormDesignerControl is not set.

public bool HideContentsWhenNoFormDesignerIsSet { get; set; }

Property Value

bool

Examples

Here is how to use a HideContentsWhenNoFormDesignerIsSet in the C# code:

using Alternet.FormDesigner.WinForms;

public partial class Form1 : Form
{
    private void Form1_Load(object sender, EventArgs e)
    {
        var formDesigner = new FormDesignerControl();
        formDesigner.AutoSaveToSource = false;
        formDesigner.Dock = System.Windows.Forms.DockStyle.Left;
        formDesigner.Parent = this;

        var toolboxControl = new ToolboxControl();
        toolboxControl.Parent = this;
        toolboxControl.Dock = System.Windows.Forms.DockStyle.Fill;
        toolboxControl.FormDesignerControl = formDesigner;
        toolboxControl.HideContentsWhenNoFormDesignerIsSet = true;
    }
}

Here is how to use a HideContentsWhenNoFormDesignerIsSet in the Visual Basic code:

Imports System
Imports Alternet.FormDesigner.WinForms

Partial Public Class Form1
    Inherits Form
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim formDesigner = New FormDesignerControl()
        formDesigner.AutoSaveToSource = False
        formDesigner.Dock = Windows.Forms.DockStyle.Left
        formDesigner.Parent = Me

        Dim toolboxControl = New ToolboxControl()
        toolboxControl.Parent = Me
        toolboxControl.Dock = Windows.Forms.DockStyle.Fill
        toolboxControl.FormDesignerControl = formDesigner
        toolboxControl.HideContentsWhenNoFormDesignerIsSet = True
    End Sub
End Class

Remarks

Setting this value to true causes ToolboxControl to hide its content when the FormDesignerControl property is not set.

The default value of the HideContentsWhenNoFormDesignerIsSet is false.