Skip to content

Commit c022636

Browse files
UG updated
1 parent f5c228f commit c022636

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

Extension/WindowsForms-Extension/Template-Studio.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,47 +91,45 @@ Create the Syncfusion WinForms project using the Visual Studio Project Template
9191
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.
9292

9393
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:
94+
95+
*I. Application Host:*
9896
- Registers **ApplicationHostService** to manage the app's lifecycle.
9997

100-
II. Specific Services:
98+
*II. Specific Services:*
10199
- Registers **PageService** and **NavigationService** for handling page navigation.
102100

103-
III. Views and ViewModels:
101+
*III. Views and ViewModels:*
104102
- **ShellWindow:** Registers the main application window.
105103
- **DataGridPage:** Registers the added component DataGrid on UI.
106104
- **MainPage:** Registers the main page of the application.
107105

108-
IV. Configuration:
106+
*IV. Configuration:*
109107
- Binds the app's configuration settings to the **AppConfig** class using the settings from the configuration file.
110108

109+
![DI-Setup](Template-Studio-Images/DI-Setup.png)
110+
111111
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.
112112
Here's a simple explanation:
113-
114-
![PageService](Template-Studio-Images/PageService.png)
115-
116-
I. Initialization:
113+
114+
*I. Initialization:*
117115
- 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.
118116

119-
II. Registering Pages:
117+
*II. Registering Pages:*
120118
- **Configure `<DataGridPage>()`:** Registers DataGridPage with the service provider.
121119
- **Configure `<MainPage>()`:** Registers MainPage with the service provider.
122120

121+
![PageService](Template-Studio-Images/PageService.png)
122+
123123
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.
124124

125125
![Resources](Template-Studio-Images/Resources.png)
126126

127127

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.
129-
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 |
128+
> | .NET Version | Available From Version | Supported from Visual Studio | Listed in "Select a framework version" when SDK is installed |
129+
> |--------------|------------------------|-----------------------------|--------------------------------------------------------------|
130+
> | .NET 6.0 | v19.4.0.38 | Visual Studio 2022 | Yes |
131+
> | .NET 7.0 | v20.4.0.38 | Visual Studio 2022 | Yes |
132+
> | .NET 8.0 | v23.2.4 | Visual Studio 2022 | Yes |
135133
136134
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.
137135

0 commit comments

Comments
 (0)