syncfusion-winforms-common

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Implementing Syncfusion Windows Forms Components

实现Syncfusion Windows Forms组件

Comprehensive guide for implementing Syncfusion® Essential Studio® Windows Forms (WinForms) controls in desktop applications. This skill covers everything from initial setup and installation to localization and .NET compatibility.
在桌面应用中实现Syncfusion® Essential Studio® Windows Forms (WinForms) 控件的综合指南,本指南覆盖从初始设置安装到本地化、.NET兼容性的全流程内容。

When to Use This Skill

何时使用本指南

Use this skill when you need to:
  • Add Syncfusion WinForms controls to a Windows Forms application
  • Register and manage license keys for WinForms applications
  • Install or upgrade Syncfusion WinForms via installer or NuGet
  • Set up .NET Core / .NET 5-9 projects with Syncfusion WinForms controls
  • Enable High DPI support for Syncfusion WinForms controls
  • Localize Syncfusion WinForms controls for different cultures
  • Troubleshoot installation, licensing, or runtime errors
当你需要完成以下操作时可参考本指南:
  • 为Windows Forms应用添加Syncfusion WinForms控件
  • 为WinForms应用注册和管理许可证密钥
  • 通过安装包或NuGet安装/升级Syncfusion WinForms
  • 搭建搭载Syncfusion WinForms控件的.NET Core / .NET 5-9项目
  • 为Syncfusion WinForms控件开启高DPI支持
  • 针对不同文化环境本地化Syncfusion WinForms控件
  • 排查安装、授权或运行时错误

Library Overview

库概览

Syncfusion® Essential Studio® for Windows Forms provides a comprehensive suite of UI controls for building rich Windows desktop applications, including grids, charts, schedulers, editors, navigation, layout, and input controls. All controls are designed for WinForms applications and support .NET Framework 4.6.2+ and .NET 6.0–9.0.

Syncfusion® Essential Studio® for Windows Forms提供了一套全面的UI控件套件,用于构建功能丰富的Windows桌面应用,包括表格、图表、日程组件、编辑器、导航、布局和输入控件。所有控件专为WinForms应用设计,支持.NET Framework 4.6.2+ 和 .NET 6.0–9.0版本。

Documentation and Navigation Guide

文档与导航指南

Getting Started

入门指南

📄 Read: references/getting-started.md
  • Adding controls via Designer (Toolbox drag-drop)
  • Adding controls via Code (C# / VB)
  • Using Project Templates and Item Templates
  • Assembly references required for controls
  • Control dependency lookup (assembly and NuGet per control)
📄 阅读: references/getting-started.md
  • 通过设计器添加控件(工具箱拖拽)
  • 通过代码(C# / VB)添加控件
  • 使用项目模板和项模板
  • 控件所需的程序集引用
  • 控件依赖查询(每个控件对应的程序集和NuGet包)

Localization

本地化

📄 Read: references/localization.md
  • Using
    ILocalizationProvider
    interface
  • Using Satellite Assemblies for multi-language support
  • Localizing with
    .resx
    files
  • Changing application culture at runtime
  • Editing default culture strings
📄 阅读: references/localization.md
  • 使用
    ILocalizationProvider
    接口
  • 使用附属程序集实现多语言支持
  • 通过
    .resx
    文件实现本地化
  • 运行时修改应用文化设置
  • 编辑默认文化字符串

High DPI Support

高DPI支持

📄 Read: references/high-dpi-support.md
  • DPI awareness overview (DPI-aware vs non-DPI-aware apps)
  • DPI compatibility test matrix
  • Enabling DPI awareness via
    app.manifest
  • AutoScaleDimensions
    and
    AutoScaleMode
    setup
  • Enabling
    DpiAware
    property for Grid controls
  • Auto-switching images by DPI scaling with
    ImageListAdv
📄 阅读: references/high-dpi-support.md
  • DPI感知概述(DPI感知 vs 非DPI感知应用)
  • DPI兼容性测试矩阵
  • 通过
    app.manifest
    开启DPI感知
  • AutoScaleDimensions
    AutoScaleMode
    设置
  • 为表格控件开启
    DpiAware
    属性
  • 通过
    ImageListAdv
    实现按DPI缩放自动切换图片

System Requirements

系统要求

📄 Read: references/system-requirements.md
  • Supported Windows OS versions
  • Hardware requirements (processor, RAM, disk)
  • Supported Visual Studio versions
  • Supported .NET Framework and .NET versions
📄 阅读: references/system-requirements.md
  • 支持的Windows操作系统版本
  • 硬件要求(处理器、内存、磁盘)
  • 支持的Visual Studio版本
  • 支持的.NET Framework和.NET版本

.NET Compatibility

.NET兼容性

📄 Read: references/dotnet-compatibility.md
  • Creating WinForms apps with .NET Core / .NET 5-9
  • Adding Syncfusion controls in .NET Core projects (assembly / NuGet)
  • .NET Framework and .NET Core version compatibility matrix
  • Version-specific .NET support per Syncfusion release
📄 阅读: references/dotnet-compatibility.md
  • 基于.NET Core / .NET 5-9创建WinForms应用
  • 在.NET Core项目中添加Syncfusion控件(程序集/NuGet)
  • .NET Framework和.NET Core版本兼容性矩阵
  • 每个Syncfusion版本对应的特定.NET支持情况

Upgrading

版本升级

📄 Read: references/upgrading.md
  • Upgrading via Control Panel / website installer
  • Upgrading via Visual Studio Extensions
  • Upgrading NuGet packages via Package Manager UI
  • Upgrading NuGet packages via Package Manager Console
  • Upgrading NuGet packages via .NET CLI
  • Upgrading from trial to licensed version
📄 阅读: references/upgrading.md
  • 通过控制面板/官网安装包升级
  • 通过Visual Studio扩展升级
  • 通过包管理器UI升级NuGet包
  • 通过包管理器控制台升级NuGet包
  • 通过.NET CLI升级NuGet包
  • 从试用版升级到授权版

Installation

安装

📄 Read: references/installation.md
  • Downloading the offline installer (trial and licensed)
  • Installing with the UI wizard (step-by-step)
  • Silent/command-line installation and uninstallation
  • Installing NuGet packages via Package Manager UI
  • Installing NuGet packages via .NET CLI
  • Installing NuGet packages via Package Manager Console
  • Common installation errors and solutions

📄 阅读: references/installation.md
  • 下载离线安装包(试用版和授权版)
  • 通过UI向导安装(分步指引)
  • 静默/命令行安装与卸载
  • 通过包管理器UI安装NuGet包
  • 通过.NET CLI安装NuGet包
  • 通过包管理器控制台安装NuGet包
  • 常见安装错误与解决方案

Quick Start

快速开始

1. Install via NuGet

1. 通过NuGet安装

powershell
undefined
powershell
undefined

Package Manager Console

包管理器控制台

Install-Package Syncfusion.Shared.Base
Install-Package Syncfusion.Shared.Base

.NET CLI

.NET CLI

dotnet add package Syncfusion.Shared.Base
undefined
dotnet add package Syncfusion.Shared.Base
undefined

2. Register License Key

2. 注册许可证密钥

Register the license before any Syncfusion control is initialized:
csharp
// Program.cs — in static void Main(), before Application.Run()
static void Main()
{
    Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY");

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new Form1());
}
在任意Syncfusion控件初始化之前注册许可证:
csharp
// Program.cs — 在static void Main()中,Application.Run()之前执行
static void Main()
{
    Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("你的许可证密钥");

    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    Application.Run(new Form1());
}

3. Add a Control via Code

3. 通过代码添加控件

csharp
using Syncfusion.Windows.Forms.Tools;

// Create and configure the control
TextBoxExt textBox = new TextBoxExt();
textBox.Location = new System.Drawing.Point(100, 100);
textBox.Size = new System.Drawing.Size(200, 25);

// Add to form
this.Controls.Add(textBox);

csharp
using Syncfusion.Windows.Forms.Tools;

// 创建并配置控件
TextBoxExt textBox = new TextBoxExt();
textBox.Location = new System.Drawing.Point(100, 100);
textBox.Size = new System.Drawing.Size(200, 25);

// 添加到窗体
this.Controls.Add(textBox);

Common Patterns

常用实现方案

Enable High DPI

开启高DPI支持

In
app.manifest
:
xml
<application xmlns="urn:schemas-microsoft-com:asm.v3">
  <windowsSettings>
    <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
  </windowsSettings>
</application>
In code (for Grid controls):
csharp
gridControl1.DpiAware = true;
app.manifest
中添加:
xml
<application xmlns="urn:schemas-microsoft-com:asm.v3">
  <windowsSettings>
    <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
  </windowsSettings>
</application>
在代码中配置(针对表格控件):
csharp
gridControl1.DpiAware = true;

Localize Controls at Runtime

运行时本地化控件

csharp
// Set culture before InitializeComponent()
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");

csharp
// 在InitializeComponent()之前设置文化
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");

Key Assemblies

核心程序集

AssemblyControls Covered
Syncfusion.Shared.Base
ButtonAdv, most shared controls
Syncfusion.Tools.Windows
ComboBoxAdv, DockingManager, TabControlAdv, and most Tools controls
Syncfusion.Grid.Windows
GridControl, GridGroupingControl
Syncfusion.Chart.Windows
Chart control
Syncfusion.SfDataGrid.WinForms
SfDataGrid
For per-control dependency lookup, read references/getting-started.md.

程序集涵盖的控件
Syncfusion.Shared.Base
ButtonAdv、大多数通用控件
Syncfusion.Tools.Windows
ComboBoxAdv、DockingManager、TabControlAdv以及大多数工具类控件
Syncfusion.Grid.Windows
GridControl、GridGroupingControl
Syncfusion.Chart.Windows
图表控件
Syncfusion.SfDataGrid.WinForms
SfDataGrid
如需查询单个控件的依赖,请阅读references/getting-started.md

Common Use Cases

常见使用场景

  • Business forms: Add input controls, editors, and validation with Syncfusion WinForms tools
  • Data-heavy UIs: Use GridControl or SfDataGrid with high DPI support
  • Multi-language apps: Use
    .resx
    files or
    ILocalizationProvider
    for localization
  • CI/CD pipelines: Validate license key automatically using
    LicenseKeyValidator
  • 业务表单: 借助Syncfusion WinForms工具添加输入控件、编辑器和验证功能
  • 数据密集型UI: 使用支持高DPI的GridControl或SfDataGrid
  • 多语言应用: 通过
    .resx
    文件或
    ILocalizationProvider
    实现本地化
  • CI/CD流水线: 使用
    LicenseKeyValidator
    自动验证许可证密钥