Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

syncfusion-winui-treegridSynfusion Winui 树形网格

Agent Skill

syncfusion-winui-treegrid 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

612

周安装

25

GitHub Stars

公开资料未说明

下载量

198
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-winui-treegrid(Synfusion Winui 树形网格)
来源仓库:https://github.com/syncfusion/winui-ui-components-skills
仓库路径:skills/syncfusion-winui-treegrid
安装命令:
npx skills add https://github.com/syncfusion/winui-ui-components-skills --skill syncfusion-winui-treegrid
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/winui-ui-components-skills --skill syncfusion-winui-treegrid

简介

Synfusion WinUI 树形网格组件,用于分层数据的表格展示。

  • 适用于开发场景中的复杂数据结构可视化。syncfusion-winui-treegrid 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 通过 GitHub 仓库安装,使用 npx skills add 命令集成。
  • 安装时需注意数据绑定性能与滚动优化策略。
  • 建议查阅原始文档了解展开/折叠事件与单元格编辑支持。

SKILL.md

Implementing Syncfusion WinUI TreeGrid

When to Use This Skill

Use this skill when you need to:

  • Display hierarchical or self-relational data in a tree-structured grid
  • Create data grids with parent-child relationships
  • Implement expandable/collapsible rows with nested data
  • Build organizational charts or employee hierarchies in grid format
  • Display file system structures with grid features
  • Work with category hierarchies, bill of materials, or nested classifications
  • Need advanced grid features (sorting, filtering, editing) on tree-structured data
  • Visualize multi-level data with column-based representation

Component Overview

The Syncfusion® WinUI TreeGrid (SfTreeGrid) is a data-oriented control that displays self-relational or hierarchical data in a tree structure with grid capabilities. It combines the tree view's expandable/collapsible navigation with the data grid's rich feature set.

Control Name: SfTreeGrid Namespace: Syncfusion.UI.Xaml.TreeGrid NuGet Package: Syncfusion.Grid.WinUI Platform: WinUI 3 (Windows App SDK)

Key Capabilities

  • Data Binding: Self-relational and nested collection support
  • Columns: 8 built-in column types with auto-generation
  • Editing: Built-in editors for all column types with validation
  • Sorting: Single and multi-column sorting
  • Filtering: Excel-inspired filter UI
  • Selection: Row and cell selection modes
  • Node Features: Checkboxes, load-on-demand, expand/collapse
  • Row Operations: Drag-and-drop, merge cells
  • Data Operations: Clipboard operations, Excel export
  • Styling: Conditional styling, custom templates
  • Advanced: Context menus, tooltips, MVVM support

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Creating WinUI TreeGrid application setup
  • NuGet package installation (Syncfusion.Grid.WinUI)
  • Namespace imports and basic initialization
  • First TreeGrid with minimal XAML/C# code
  • Quick render verification

Data Binding

📄 Read: references/data-binding.md

  • Binding self-relational data (ParentPropertyName, ChildPropertyName)
  • SelfRelationRootValue configuration for root nodes
  • Binding nested collections (hierarchical objects)
  • Creating data models and ViewModels
  • ItemsSource binding patterns
  • Tree structure formation examples

Columns and Column Types

📄 Read: references/columns.md

  • 8 built-in column types (Text, Numeric, Date, Time, CheckBox, ComboBox, Hyperlink, Template)
  • Auto-generating columns vs manual definition
  • AutoGeneratingColumn event for customization
  • Column type selection based on data types
  • TreeGridColumn base class and properties

Column Configuration

📄 Read: references/column-configuration.md

  • Column sizing and width modes (Auto, Star, Fill)
  • Header customization and formatting
  • MappingName for data binding
  • Column visibility and ordering
  • Frozen columns for fixed display
  • Cell and edit templates

Editing and Validation

📄 Read: references/editing.md

  • Enabling editing (AllowEditing property)
  • Column-level editing control
  • Edit mode configuration
  • CurrentCellBeginEdit and CurrentCellEndEdit events
  • Data validation during editing
  • Programmatic editing operations
  • Custom editor templates

Selection

📄 Read: references/selection.md

  • Selection modes (Single, Multiple, Extended, None)
  • Row selection vs cell selection (SelectionUnit)
  • SelectionChanging and SelectionChanged events
  • Programmatic selection APIs
  • SelectedItem, SelectedItems properties
  • Keyboard navigation patterns

Sorting and Filtering

📄 Read: references/sorting-filtering.md

  • Single and multi-column sorting
  • SortColumnDescriptions collection
  • SortColumnChanging/Changed events
  • Custom sorting logic
  • Excel-inspired filter UI (AllowFiltering)
  • FilterChanging/Changed events
  • Programmatic filtering with predicates
  • Filter customization

Row Operations

📄 Read: references/row-operations.md

  • Row height customization
  • Row drag-and-drop functionality
  • Drag-drop events and validation
  • Merge cells feature
  • Cell merging configuration
  • Conditional row styling
  • Row validation rules

Node Features

📄 Read: references/node-features.md

  • Node checkboxes for selection
  • Recursive checking behavior
  • NodeCheckStateChanging/Changed events
  • Load-on-demand (lazy loading child nodes)
  • LoadOnDemandCommand
  • HasChildNodes property
  • Dynamic child population

Data Operations

📄 Read: references/data-operations.md

  • Clipboard operations (copy/paste)
  • CopyOption property configuration
  • CopyGridCellContent event
  • Export to Excel functionality
  • ExcelExportingOptions
  • Exporting selected items
  • Export customization and formatting

Styling and Customization

📄 Read: references/styling-customization.md

  • Conditional styling based on data
  • Cell and row styling
  • QueryCellStyle and QueryRowStyle events
  • GridLines customization
  • GridLinesVisibility property
  • UI customization and templates
  • Theme integration

Advanced Features

📄 Read: references/advanced-features.md

  • Context flyout menus
  • Custom context menu items
  • Tooltips for cells and headers
  • Custom tooltip templates
  • MVVM pattern support
  • Commands and data binding
  • Helper methods and utilities
  • Performance optimization techniques

Quick Start Example

Self-Relational Data

<Window
    x:Class="TreeGridDemo.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:treeGrid="using:Syncfusion.UI.Xaml.TreeGrid">

    <Window.DataContext>
        <local:ViewModel/>
    </Window.DataContext>

    <Grid>
        <treeGrid:SfTreeGrid x:Name="treeGrid"
                            ItemsSource="{Binding Employees}"
                            ParentPropertyName="ID"
                            ChildPropertyName="ReportsTo"
                            SelfRelationRootValue="-1"
                            AutoExpandMode="RootNodesExpanded" />
    </Grid>
</Window>
public class EmployeeInfo
{
    public int ID { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Title { get; set; }
    public double Salary { get; set; }
    public int ReportsTo { get; set; }
}

public class ViewModel
{
    public ObservableCollection<EmployeeInfo> Employees { get; set; }

    public ViewModel()
    {
        Employees = new ObservableCollection<EmployeeInfo>
        {
            new EmployeeInfo { ID = 1, FirstName = "John", LastName = "Doe",
                              Title = "CEO", Salary = 200000, ReportsTo = -1 },
            new EmployeeInfo { ID = 2, FirstName = "Jane", LastName = "Smith",
                              Title = "Manager", Salary = 120000, ReportsTo = 1 },
            new EmployeeInfo { ID = 3, FirstName = "Bob", LastName = "Johnson",
                              Title = "Developer", Salary = 80000, ReportsTo = 2 }
        };
    }
}

Nested Collection Data

public class PersonInfo
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public double Salary { get; set; }
    public ObservableCollection<PersonInfo> Children { get; set; }
}
<treeGrid:SfTreeGrid x:Name="treeGrid"
                    ItemsSource="{Binding PersonDetails}"
                    ChildPropertyName="Children" />

Common Patterns

Self-Relational Data Structure

Use when data objects reference each other via ID/ParentID:

// Each employee has an ID and ReportsTo (parent ID)
ParentPropertyName = "ID"
ChildPropertyName = "ReportsTo"
SelfRelationRootValue = -1  // Root nodes have ReportsTo = -1

Nested Collection Structure

Use when data objects contain child collections:

// Each person has a Children property containing child objects
ChildPropertyName = "Children"
// No ParentPropertyName needed

Column Auto-Generation Control

<!-- Auto-generate columns from data properties -->
<treeGrid:SfTreeGrid AutoGenerateColumns="True" />

<!-- Define columns manually for full control -->
<treeGrid:SfTreeGrid AutoGenerateColumns="False">
    <treeGrid:SfTreeGrid.Columns>
        <treeGrid:TreeGridTextColumn MappingName="FirstName" HeaderText="First Name"/>
        <treeGrid:TreeGridNumericColumn MappingName="Salary" DisplayNumberFormat="C2"/>
    </treeGrid:SfTreeGrid.Columns>
</treeGrid:SfTreeGrid>

MVVM Data Binding

public class ViewModel : INotifyPropertyChanged
{
    private ObservableCollection<DataModel> _items;

    public ObservableCollection<DataModel> Items
    {
        get => _items;
        set
        {
            _items = value;
            OnPropertyChanged();
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    protected void OnPropertyChanged([CallerMemberName] string name = null)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
    }
}

Expand/Collapse Control

// Auto-expand modes
AutoExpandMode = AutoExpandMode.AllNodesExpanded;  // All expanded
AutoExpandMode = AutoExpandMode.RootNodesExpanded; // Only root
AutoExpandMode = AutoExpandMode.None;              // All collapsed

// Programmatic control
treeGrid.ExpandNode(node);
treeGrid.CollapseNode(node);
treeGrid.ExpandAllNodes();
treeGrid.CollapseAllNodes();

Key Properties

Data Binding Properties

  • ItemsSource - Data source (IEnumerable)

- When: Always required for data binding - Why: Provides the data to display

  • ChildPropertyName - Property containing child collection or parent reference

- When: Required for all tree structures - Why: Defines the tree relationship

  • ParentPropertyName - Property containing unique identifier (self-relational only)

- When: Only for self-relational data - Why: Identifies parent nodes

  • SelfRelationRootValue - Value indicating root nodes (self-relational only)

- When: With self-relational data - Why: Identifies which nodes are roots (default: null)

Display Properties

  • AutoGenerateColumns - Auto-create columns from properties (default: true)

- When: Set false for manual column control - Why: Automatic vs explicit column definition

  • AutoExpandMode - Initial expand state

- When: Control initial tree visibility - Why: User experience for data exploration

  • ColumnWidthMode - How columns calculate width

- When: Control column sizing behavior - Why: Auto, Star, or fixed widths

Feature Properties

  • AllowEditing - Enable cell editing (default: false)

- When: Editable grid needed - Why: In-place data modification

  • AllowFiltering - Enable filter UI (default: false)

- When: Large datasets need filtering - Why: Excel-style data filtering

  • SelectionMode - Row/cell selection type

- When: Control selection behavior - Why: Single, Multiple, Extended, or None

  • SelectionUnit - Select rows or cells

- When: Define selection granularity - Why: Row vs cell-level selection

Common Use Cases

Organizational Hierarchy

Display company structure with employees reporting to managers:

ParentPropertyName = "EmployeeID"
ChildPropertyName = "ManagerID"

File System Browser

Show folders and files in tree structure:

ChildPropertyName = "SubItems"  // Nested collection

Category Management

Display product categories with subcategories:

ChildPropertyName = "SubCategories"

Bill of Materials (BOM)

Show product assemblies and components:

ParentPropertyName = "PartID"
ChildPropertyName = "ParentPartID"

Task/Project Management

Display tasks with subtasks:

ChildPropertyName = "SubTasks"

Geographic Hierarchies

Show countries > states > cities:

ChildPropertyName = "Children"

Troubleshooting

Tree Structure Not Forming

  • Verify ParentPropertyName and ChildPropertyName are set correctly
  • Check SelfRelationRootValue matches your data's root indicator
  • Ensure data relationships are properly defined

Columns Not Appearing

  • Set AutoGenerateColumns = True, or define columns manually
  • Check MappingName matches property names exactly (case-sensitive)
  • Verify data source is bound to ItemsSource

Performance Issues with Large Datasets

  • Enable load-on-demand for lazy loading
  • Use on-demand mode to defer child node loading
  • Consider data virtualization for very large trees

Editing Not Working

  • Set AllowEditing = True on TreeGrid
  • Check column-level AllowEditing property
  • Ensure data objects implement INotifyPropertyChanged

Next Steps: Read the getting-started guide, then explore feature-specific references based on your requirements.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.58%
按下载量换算70

Claude

27.94%
按下载量换算55

Cursor

20.3%
按下载量换算40

Gemini CLI

9.88%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills