Loading...
Loading...
Compare original and translation side by side
dotnet add packagedotnet add packageundefinedundefined
```xml
<!-- In MainWindow.xaml -->
<Window x:Class="WpfApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
Title="Syncfusion WPF Demo" Height="450" Width="800">
<Grid>
<syncfusion:SfDataGrid x:Name="dataGrid"
AutoGenerateColumns="True"
ItemsSource="{Binding Employees}"/>
</Grid>
</Window>
```xml
<!-- 在MainWindow.xaml中 -->
<Window x:Class="WpfApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
Title="Syncfusion WPF Demo" Height="450" Width="800">
<Grid>
<syncfusion:SfDataGrid x:Name="dataGrid"
AutoGenerateColumns="True"
ItemsSource="{Binding Employees}"/>
</Grid>
</Window>// In App.xaml.cs or before InitializeComponent()
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");Note: License registration is required if using trial installer or NuGet packages. Generate your license key from the Syncfusion License & Downloads page.
// 在App.xaml.cs中或InitializeComponent()之前
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");注意:如果使用试用版安装程序或NuGet包,必须注册许可证密钥。可从Syncfusion License & Downloads页面生成你的许可证密钥。
undefinedundefined
**Advantages**:
- No full installer required
- Install only the controls you need
- Easy version management per project
- Works great in CI/CD pipelines
**Note**: You'll need to register a license key in your application.
**优势**:
- 无需完整安装程序
- 仅安装你需要的控件
- 便于按项目管理版本
- 非常适合CI/CD流水线
**注意**:你需要在应用中注册许可证密钥。// Replace trial key with licensed key
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSED_KEY");// 用授权密钥替换试用密钥
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSED_KEY");Do you need all Syncfusion WPF controls?
├─ YES → Do you have reliable internet?
│ ├─ YES → Use Web Installer
│ └─ NO → Use Offline Installer
│
└─ NO → Do you need only a few specific controls?
└─ YES → Use NuGet Packages
├─ Package Manager UI (visual approach)
├─ Package Manager Console (PowerShell commands)
└─ Dotnet CLI (command-line for .NET Core/.NET 8+)你是否需要所有Syncfusion WPF控件?
├─ 是 → 你有稳定的网络吗?
│ ├─ 是 → 使用在线安装程序
│ └─ 否 → 使用离线安装程序
│
└─ 否 → 你只需要少数特定控件吗?
└─ 是 → 使用NuGet包
├─ 包管理器UI(可视化方式)
├─ 包管理器控制台(PowerShell命令)
└─ Dotnet CLI(适用于.NET Core/.NET 8+的命令行)Syncfusion.SfGrid.WPF.dllSyncfusion.SfChart.WPF.dllSyncfusion.SfShared.WPF.dllSyncfusion.SfInput.WPF.dllSyncfusion.Tools.WPF.dllSyncfusion.SfGrid.WPF.dllSyncfusion.SfChart.WPF.dllSyncfusion.SfShared.WPF.dllSyncfusion.SfInput.WPF.dllSyncfusion.Tools.WPF.dllxmlns:syncfusion="http://schemas.syncfusion.com/wpf"using Syncfusion.UI.Xaml.Grid; // For SfDataGrid
using Syncfusion.UI.Xaml.Charts; // For SfChart
using Syncfusion.Windows.Controls.Input; // For input controlsxmlns:syncfusion="http://schemas.syncfusion.com/wpf"using Syncfusion.UI.Xaml.Grid; // 用于SfDataGrid
using Syncfusion.UI.Xaml.Charts; // 用于SfChart
using Syncfusion.Windows.Controls.Input; // 用于输入控件// In App.xaml.cs constructor, before InitializeComponent()
public App()
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
InitializeComponent();
}// 在App.xaml.cs构造函数中,在InitializeComponent()之前
public App()
{
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
InitializeComponent();
}<!-- In App.xaml -->
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Syncfusion.Themes.MaterialLight.WPF;component/MSControl/SfDataGrid.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources><!-- 在App.xaml中 -->
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Syncfusion.Themes.MaterialLight.WPF;component/MSControl/SfDataGrid.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>Install-Package Syncfusion.SfGrid.WPFInstall-Package Syncfusion.SfGrid.WPF