| layout | post |
|---|---|
| title | Getting Started with Windows Forms CheckBox control | Syncfusion® |
| description | Learn here about getting started with Syncfusion® Windows Forms CheckBox (CheckBoxAdv) control and more details. |
| platform | windowsforms |
| control | CheckBoxAdv |
| documentation | ug |
This section gives detailed description on Getting Started of CheckBoxAdv control.
Refer to the Control Dependencies section to get the list of assemblies or details of NuGet package that needs to be added as reference to use the control in any application.
Refer to NuGet Packages to learn how to install nuget packages in a Windows Forms application.
The following steps explain how to create the CheckBoxAdv control via designer.
-
Create a new Windows Forms Project in Visual Studio.
-
Drag and drop the CheckBoxAdv from toolbox in Form designer window.
-
The dependent assemblies will be added automatically.
In order to add CheckBoxAdv control manually, do the below steps,
-
Add the required assembly references to the project.
-
Create the CheckBoxAdv control instance and add it to the Form.
-
Include the required namespace.
{% capture codesnippet1 %} {% tabs %} {% highlight c# %}
using Syncfusion.Windows.Forms.Tools;
{% endhighlight %}
{% highlight vb %}
Imports Syncfusion.Windows.Forms.Tools
{% endhighlight %} {% endtabs %} {% endcapture %} {{ codesnippet1 | OrderList_Indent_Level_1 }}
{% capture codesnippet2 %} {% tabs %} {% highlight c# %}
CheckBoxAdv checkBoxAdv = new CheckBoxAdv() {Text="CheckBoxAdv", Height = 25, Width = 200 }; this.Controls.Add(checkBoxAdv);
{% endhighlight %}
{% highlight vb %}
Dim checkBoxAdv As CheckBoxAdv = New CheckBoxAdv() With {.Text="CheckBoxAdv", .Height = 25, .Width = 200} Me.Controls.Add(checkBoxAdv)
{% endhighlight %} {% endtabs %} {% endcapture %} {{ codesnippet2 | OrderList_Indent_Level_1 }}
You can get or set the current checked status of CheckBoxAdv using the Checked or CheckState property. The default value of Checked property is false and CheckState property is Unchecked.
{% tabs %} {% highlight c# %}
this.checkBoxAdv1.Checked = true; this.checkBoxAdv1.CheckState = System.Windows.Forms.CheckState.Checked;
{% endhighlight %} {% highlight VB %}
Me.checkBoxAdv1.Checked = True Me.checkBoxAdv1.CheckState = System.Windows.Forms.CheckState.Checked
{% endhighlight %} {% endtabs %}
N> To learn more about the CheckBoxAdv states click here.

