Table of Contents

Property SearchFilter

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

SearchFilter

Gets or sets the filter string that determines which controls will be displayed by the ToolboxControl.

public string SearchFilter { get; set; }

Property Value

string

Examples

Here is how to use a SearchFilter 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.SearchFilter = "Box";
    }
}

Here is how to use a SearchFilter 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.SearchFilter = "Box"
    End Sub
End Class

Remarks

SearchFilter defines a search text and allows the display of only items that match the filter criteria.