You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Extension/WindowsForms-Extension/Template-Studio.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,47 +91,45 @@ Create the Syncfusion WinForms project using the Visual Studio Project Template
91
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
92
93
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
-

96
-
97
-
I. Application Host:
94
+
95
+
*I. Application Host:*
98
96
- Registers **ApplicationHostService** to manage the app's lifecycle.
99
97
100
-
II. Specific Services:
98
+
*II. Specific Services:*
101
99
- Registers **PageService** and **NavigationService** for handling page navigation.
102
100
103
-
III. Views and ViewModels:
101
+
*III. Views and ViewModels:*
104
102
-**ShellWindow:** Registers the main application window.
105
103
-**DataGridPage:** Registers the added component DataGrid on UI.
106
104
-**MainPage:** Registers the main page of the application.
107
105
108
-
IV. Configuration:
106
+
*IV. Configuration:*
109
107
- Binds the app's configuration settings to the **AppConfig** class using the settings from the configuration file.
110
108
109
+

110
+
111
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.
- 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
116
119
-
II. Registering Pages:
117
+
*II. Registering Pages:*
120
118
- **Configure `<DataGridPage>()`:** Registers DataGridPage with the service provider.
121
119
- **Configure `<MainPage>()`:** Registers MainPage with the service provider.
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.
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.
129
-
130
-
> | .NET Version | Available From Version | Supported from Visual Studio |
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.
0 commit comments