Skip to content

EXT-16798 - WinForms UG changes #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 31 additions & 10 deletions WindowsForms/Visual-Studio-Integration/Item-Template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ control: Syncfusion Extensions
documentation: ug
---

# Add Syncfusion Components to the WinForms Application
# Add Syncfusion components to the WinForms Application

Syncfusion supports Visual Studio Item Templates to add Syncfusion WinForms Components to a WinForms application with Syncfusion WinForms references.
Syncfusion provides robust support for Visual Studio Item Templates, which facilitate the seamless integration of Syncfusion WinForms components and preconfigured forms into your WinForms application. These templates include all necessary Syncfusion WinForms libraries, ensuring a smooth development experience.

I> The Syncfusion Windows Forms item templates are available from v13.1.0.21.

The following steps will guide you in adding the Syncfusion WinForms components to your Visual Studio WinForms application.

> Check whether the **WinForms Extensions - Syncfusion** are installed or not in Visual Studio Extension Manager by going to **Extensions -> Manage Extensions -> Installed** for Visual Studio 2019 or later and Visual Studio 2017 or lower by going to **Tools -> Extensions and Updates -> Installed**. If this extension is not installed, please install the extension by following the steps from the [download and installation](https://help.syncfusion.com/windowsforms/visual-studio-integration/download-and-installation) help topic.

## Add Components using Syncfusion Item Template
## Add components using Syncfusion Item Template

1. Open a new or existing WinForms application.

Expand All @@ -33,25 +33,46 @@ The following steps will guide you in adding the Syncfusion WinForms components

![Choose Add Syncfusion Item option from menu](Item-Template-images/Add-item.png)


4. The Syncfusion WinForms Item Template wizard will be launched as follows.

![Syncfusion WinForms Item template Components](Item-Template-images/Add-syncfusion-ui.png)
![Syncfusion WinForms Item template components](Item-Template-images/Add-syncfusion-ui.png)

5. Please choose one of the following scenarios to add Syncfusion Forms in your application:

**Default Form with Syncfusion Component:** If you select the **Default** form and then choose any Syncfusion component and the specific features that are essential for your project, the selected component will be added with the default Microsoft form layout.

![Default Form with Syncfusion Component](Item-Template-images/Default-Form-with-Syncfusion-Component.png)

**Syncfusion Form with Syncfusion Component:** If you select a Syncfusion form and then choose any Syncfusion component and the specific features that are essential for your project, the selected component will be added with the layout of the selected Syncfusion form.

![Syncfusion Form with Syncfusion Component](Item-Template-images/Syncfusion-Form-with-Syncfusion-Component.png)

5. Select the WinForms Components from the Component list within your WinForms Item Template. The features associated with the selected Component will be presented. From here, choose the specific features that are essential for your project.
**Syncfusion Form without Syncfusion Components:** If you select a Syncfusion form and then choose the **Blank** option from the Syncfusion component list, a blank Syncfusion form will be added without any Syncfusion components.

![Syncfusion Form without Syncfusion Components](Item-Template-images/Syncfusion-Form-without-Syncfusion-Components.png)

6. Choose an assembly reference option such as GAC location, Essential Studio installed location, or NuGet packages to specify where the required Syncfusion assemblies are added to the project.

N> If the Syncfusion Essential WindowsForm build is installed, the Installed location and GAC options will be enabled. Without installing the Syncfusion Essential WindowsForm setup, use the NuGet option. The GAC option will not be available when using the Syncfusion WinForms Components in a .NET Core application. The Version drop-down lists the installed WinForms versions.
N> If the Syncfusion Essential WindowsForm build is installed, the Installed location and GAC options will be enabled. Without installing the Syncfusion Essential WindowsForm setup, use the NuGet option. The GAC option will not be available when using the Syncfusion WinForms components in a .NET Core application. The Version drop-down lists the installed WinForms versions.

7. Click **Add**, and a pop-up will appear providing information about adding Component **files** and **NuGet/Assemblies** details.
7. Click **Add**, and a pop-up will appear providing information about adding component **files** and **NuGet/Assemblies** details.

![Syncfusion WinForms Item template details](Item-Template-images/Add-syncfusion-item-3.png)

8. Click **OK** to incorporate the chosen Components into the WinForms application, along with the necessary Syncfusion assemblies.
8. Click **OK** to incorporate the chosen components into the WinForms application, along with the necessary Syncfusion assemblies.

![Syncfusion WinForms Item template Gallery](Item-Template-images/Add-syncfusion-item-details.png)

9. Then, Syncfusion licensing registration required message box will be shown if you installed the trial setup or NuGet packages since Syncfusion introduced the licensing system from 2018 Volume 2 (v16.2.0.41) Essential Studio release. Navigate to the [help topic](https://help.syncfusion.com/common/essential-studio/licensing/overview#how-to-generate-syncfusion-license-key), which is shown in the licensing message box to generate and register the Syncfusion license key to your project. Refer to this [blog](https://www.syncfusion.com/blogs/post/whats-new-in-2018-volume-2.aspx) post for understanding the licensing changes introduced in Essential Studio.

![Syncfusion WinForms Item template Gallery](Item-Template-images/Syncfusion-Item-Template-Gallery-7.png)
![Syncfusion WinForms Item template Gallery](Item-Template-images/Syncfusion-Item-Template-Gallery-7.png)

10. To run the application using the selected Syncfusion form, set the added Syncfusion Form as the startup form in your application. This ensures that when you launch the application, it opens with the selected Syncfusion Form.

**For C#:** Open the **Program.cs** file in your project. Locate the line of code where the main form is being instantiated and set as the startup form.

![Syncfusion WinForms Item template Gallery](Item-Template-images/Form-Change-CSharp.png)

**For VB:** Open the **Application.Designer.vb** file in your project. Locate the line of code where the main form is being instantiated and set as the startup form.

![Syncfusion WinForms Item template Gallery](Item-Template-images/Form-Change-VB.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 20 additions & 14 deletions WindowsForms/Visual-Studio-Integration/Template-Studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,48 +48,54 @@ Create the Syncfusion WinForms project using the Visual Studio Project Template

I> Visual Basic Language support is available in WinForms Template Studio starting from version 25.1.35.

5. Navigate to the **Project type** tab and choose the Syncfusion WinForms application type you want—there are four types: Blank, MenuBar, Ribbon and Tabbed Form. Click **Next** to proceed.
5. Navigate to the **Type** tab and choose the Syncfusion WinForms application type you want. When selecting the type of template for your application, you have two options:

![Syncfusion WinForms project type selection wizard](Template-Studio-Images/WF-4.png)

6. Click **Next** or navigate to the **Pages** tab to access a list of available Syncfusion WinForms components you can add to the application.
**Predefined template:** Choose this option to select from 5 predefined templates, including Calendar, Contact, Outlook, Docking Manager, and Spreadsheet. By choosing one of these templates, you can create your application without needing to follow any further steps.

![Syncfusion WinForms pages selection wizard](Template-Studio-Images/WF-6.png)
![Syncfusion WinForms Predefined template wizard](Template-Studio-Images/WF-10.png)

To unselect the added control(s), Click ‘x’ for the corresponding control in the control list from the Project Details.
**Project type:** Choose this option to select from 4 project types, including Blank, Menu Bar, Ribbon, and Tabbed Form.

N> The Control Features option is not accessible for Blank Pages.
1. Click **Next** or navigate to the **Pages** tab to access a list of available Syncfusion WinForms components you can add to the application.

7. Click **Next** or navigate to the **Control Features** tab to view the listed features for the selected controls. From here, choose the features needed.
![Syncfusion WinForms pages selection wizard](Template-Studio-Images/WF-6.png)

![Syncfusion WinForms control features selection wizard](Template-Studio-Images/WF-15.png)
To unselect the added control(s), Click ‘x’ for the corresponding control in the control list from the Project Details.

8. Click **Next** or navigate the **App Features** tab to select the desired application features.
N> The Control Features option is not accessible for Blank Pages.

![Syncfusion WinForms app features selection wizard](Template-Studio-Images/WF-7.png)
2. Click **Next** or navigate to the **Control Features** tab to view the listed features for the selected controls. From here, choose the features needed.

N> The App Features option is not accessible for .NET Framework.
![Syncfusion WinForms control features selection wizard](Template-Studio-Images/WF-15.png)

3. Click **Next** or navigate the **App Features** tab to select the desired application features.

![Syncfusion WinForms app features selection wizard](Template-Studio-Images/WF-7.png)

N> The App Features option is not accessible for .NET Framework.

**Project Details Section**

In the **Project Details** section, modify configurations and project types. Additionally, you can remove one or more controls from the selected list and remove the chosen application feature.

![Syncfusion WinForms project details selection and unselection wizard](Template-Studio-Images/WF-8.png)

9. Click **Create** to initiate the process. This action generates the Syncfusion WinForms application. The resulting Syncfusion WinForms app has the necessary Syncfusion NuGet packages, styles, and rendering code specific to the chosen Syncfusion component.
6. Click **Create** to initiate the process. This action generates the Syncfusion WinForms application. The resulting Syncfusion WinForms app has the necessary Syncfusion NuGet packages, styles, and rendering code specific to the chosen Syncfusion component.

![Syncfusion WinForms project created with readme](Template-Studio-Images/WF-9.png)

10. 10. The Syncfusion WinForms app is set up with the latest Syncfusion WinForms NuGet packages, including the right namespaces and rendering code. This ensures smooth integration of Syncfusion components.
7. The Syncfusion WinForms app is set up with the latest Syncfusion WinForms NuGet packages, including the right namespaces and rendering code. This ensures smooth integration of Syncfusion components.

N> The .Net 6.0, .Net 7.0, and .Net 8.0 option will be listed in Select a framework version when only the .Net 6.0, .Net 7.0, and .Net 8.0 SDK setup has been installed.
N> The .NET 6.0, .NET 7.0, and .NET 8.0 option will be listed in Select a framework version when only the .NET 6.0, .NET 7.0, and .NET 8.0 SDK setup has been installed.

> .NET 6.0 version is available from v19.4.0.38 and it support from Visual Studio 2022.

> .NET 7.0 version is available from v20.4.0.38 and it support from Visual Studio 2022.

> .NET 8.0 version is available from v23.2.4 and it support from Visual Studio 2022.

11. 11. If you install the trial setup or NuGet packages from nuget.org, you must register the Syncfusion license key to your application since Syncfusion introduced the licensing system from the 2018 Volume 2 (v16.2.0.41) Essential Studio release. Navigate to the [help topic](https://help.syncfusion.com/common/essential-studio/licensing/overview#how-to-generate-syncfusion-license-key)to generate and register the Syncfusion license key to your application. Refer to this [blog](https://www.syncfusion.com/blogs/post/whats-new-in-2018-volume-2.aspx) post for understanding the licensing changes introduced in Essential Studio.
8. If you install the trial setup or NuGet packages from nuget.org, you must register the Syncfusion license key to your application since Syncfusion introduced the licensing system from the 2018 Volume 2 (v16.2.0.41) Essential Studio release. Navigate to the [help topic](https://help.syncfusion.com/common/essential-studio/licensing/overview#how-to-generate-syncfusion-license-key) to generate and register the Syncfusion license key to your application. Refer to this [blog](https://www.syncfusion.com/blogs/post/whats-new-in-2018-volume-2.aspx) post for understanding the licensing changes introduced in Essential Studio.

![Syncfusion license registration required information dialog in Syncfusion WinForms project](Template-Studio-Images/Syncfusion-Project-Template-Gallery-8.png)