Skip to content

Commit 8192e3b

Browse files
WinForm UG Updated
1 parent e057cbf commit 8192e3b

File tree

6 files changed

+56
-13
lines changed

6 files changed

+56
-13
lines changed
33.5 KB
Loading
32.6 KB
Loading
49.3 KB
Loading
95.7 KB
Loading
50.9 KB
Loading

Extension/WindowsForms-Extension/Template-Studio.md

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,29 @@ Create the Syncfusion WinForms project using the Visual Studio Project Template
4848

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

51-
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.
51+
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:
5252

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

55-
6. Click **Next** or navigate to the **Pages** tab to access a list of available Syncfusion WinForms components you can add to the application.
55+
**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.
56+
57+
![Syncfusion WinForms Predefined template wizard](Template-Studio-Images/WF-10.png)
58+
59+
**Project type:** Choose this option to select from 4 project types, including Blank, Menu Bar, Ribbon, and Tabbed Form.
60+
61+
6. Click **Next** or navigate to the **Pages** tab to access a list of available Syncfusion WinForms components you can add to the application.
5662

5763
![Syncfusion WinForms pages selection wizard](Template-Studio-Images/WF-6.png)
5864

5965
To unselect the added control(s), Click ‘x’ for the corresponding control in the control list from the Project Details.
6066

61-
N> The Control Features option is not accessible for Blank Pages.
67+
N> The Control Features option is not accessible for Blank Pages.
6268

63-
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.
69+
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.
6470

6571
![Syncfusion WinForms control features selection wizard](Template-Studio-Images/WF-15.png)
6672

67-
8. Click **Next** or navigate the **App Features** tab to select the desired application features.
73+
8. Click **Next** or navigate the **App Features** tab to select the desired application features.
6874

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

@@ -74,22 +80,59 @@ Create the Syncfusion WinForms project using the Visual Studio Project Template
7480

7581
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.
7682

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

79-
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.
85+
9. Click **Create** to generate the Syncfusion WinForms application. Once you've created the project, the relevant Syncfusion NuGet packages will be automatically added to your project for the chosen components. For example, if you add an **DataGrid** control, the corresponding Syncfusion NuGet packages required for that control will be installed.
8086

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

83-
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.
89+
![NuGetEntry](Template-Studio-Images/NuGetEntry.png)
90+
91+
To find out which NuGet packages are needed for other WinForms controls, please refer to this [documentation link](https://help.syncfusion.com/windowsforms/control-dependencies) for detailed information on the required packages for each control.
92+
93+
10. When you create a WinForms project, the following Dependency Injection (DI) setup is added to the **Program.cs** file. This setup registers services, view models, and views with the DI container, ensuring proper functionality and service management within your application. Below **ConfigureServices** method in program.cs file establishes the DI setup in a WinForms project. It manages the application's services, view models, and views. Here's a detailed breakdown:
94+
95+
![DI-Setup](Template-Studio-Images/DI-Setup.png)
96+
97+
I. Application Host:
98+
- Registers **ApplicationHostService** to manage the app's lifecycle.
99+
100+
II. Specific Services:
101+
- Registers **PageService** and **NavigationService** for handling page navigation.
102+
103+
III. Views and ViewModels:
104+
- **ShellWindow:** Registers the main application window.
105+
- **DataGridPage:** Registers the added component DataGrid on UI.
106+
- **MainPage:** Registers the main page of the application.
107+
108+
IV. Configuration:
109+
- Binds the app's configuration settings to the **AppConfig** class using the settings from the configuration file.
110+
111+
11. In a WinForms MVVM application, the **PageService.cs** class is responsible for managing navigation and page creation. It registers view models with their corresponding pages, allowing for seamless navigation within the application.
112+
Here's a simple explanation:
113+
114+
![PageService](Template-Studio-Images/PageService.png)
115+
116+
I. Initialization:
117+
- The constructor of PageService takes an IServiceProvider to access the registered services. This allows the service to resolve and instantiate the required view models and views.
118+
119+
II. Registering Pages:
120+
- **Configure `<DataGridPage>()`:** Registers DataGridPage with the service provider.
121+
- **Configure `<MainPage>()`:** Registers MainPage with the service provider.
84122

85-
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.
123+
12. Some components require additional resource files, such as pdf and other necessary files, to function correctly. For example, if you add the **PDFViewer** and **Diagram** components to your WinForms project, the respective PDF and ico files will be added to the Resources folder in your project.
86124

87-
> .NET 6.0 version is available from v19.4.0.38 and it support from Visual Studio 2022.
125+
![Resources](Template-Studio-Images/Resources.png)
126+
88127

89-
> .NET 7.0 version is available from v20.4.0.38 and it support from Visual Studio 2022.
128+
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.
90129

91-
> .NET 8.0 version is available from v23.2.4 and it support from Visual Studio 2022.
130+
> | .NET Version | Available From Version | Supported from Visual Studio |
131+
> |--------------|------------------------|-----------------------------|
132+
> | .NET 6.0 | v19.4.0.38 | Visual Studio 2022 |
133+
> | .NET 7.0 | v20.4.0.38 | Visual Studio 2022 |
134+
> | .NET 8.0 | v23.2.4 | Visual Studio 2022 |
92135
93-
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.
136+
13. 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.
94137

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

0 commit comments

Comments
 (0)