Table of Contents

Property ToolboxControl

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

ToolboxControl

Gets or sets toolbox control associated with the designer.

[Browsable(false)]
public IToolboxControl ToolboxControl { get; set; }

Property Value

IToolboxControl

Examples

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

using Alternet.FormDesigner.WinForms;

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

Here is how to use a ToolboxControl 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 toolboxControl = New ToolboxControl()
        toolboxControl.Dock = System.Windows.Forms.DockStyle.Right
        toolboxControl.Parent = Me
        Dim formDesigner = New FormDesignerControl()
        formDesigner.AutoSaveToSource = False
        formDesigner.Dock = System.Windows.Forms.DockStyle.Fill
        formDesigner.Parent = Me
        formDesigner.ToolboxControl = toolboxControl
    End Sub
End Class

Remarks

You can associate the Form designer with the ToolboxControl object by setting ToolboxControl property. This allows users to place components onto the designer's surface, by dragging them from the toolbox.