Table of Contents

Property AutoAddComponentAssemblyReferences

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

AutoAddComponentAssemblyReferences

Gets or sets a boolean value indicating whether designer should automatically try to add assembly references after a control is added.

public bool AutoAddComponentAssemblyReferences { get; set; }

Property Value

bool

Examples

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

using Alternet.FormDesigner.WinForms;
using System;

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.Fill;
        formDesigner.Parent = this;
        formDesigner.AutoAddComponentAssemblyReferences = false;
    }
}

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

Imports Alternet.FormDesigner.WinForms
Imports System

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 = System.Windows.Forms.DockStyle.Fill
        formDesigner.Parent = Me
        formDesigner.AutoAddComponentAssemblyReferences = False
    End Sub
End Class

Remarks

By default, AutoAddComponentAssemblyReferences is set to true. You can set this property to false to skip adding assembly references related to the component or control being placed on the designed form.