Table of Contents

Property FormDesignerControl

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

FormDesignerControl

Gets or sets an IFormDesignerControl related to this property grid.

public IFormDesignerControl FormDesignerControl { get; set; }

Property Value

IFormDesignerControl

Examples

Here is how to use a FormDesignerControl 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 propertyGrid = new PropertyGridControl();
        propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
        propertyGrid.FormDesignerControl = formDesigner;
    }
}

Here is how to use a FormDesignerControl 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 propertyGrid = New PropertyGridControl()
        propertyGrid.Dock = Windows.Forms.DockStyle.Fill
        propertyGrid.FormDesignerControl = formDesigner
    End Sub
End Class

Remarks

You can associate the Form designer with the PropertyGridControl object by setting FormDesignerControl property. This allows users to place components on the designer's surface and browse their properties.