Syncfusion Maui Treegrid 标志

Syncfusion Maui Treegrid

组织
syncfusion
syncfusion-maui-treegrid

Implement and customize Syncfusion .NET MAUI Tree Grid (SfTreeGrid) for displaying and manipulating hierarchical data in a tabular view. Use when working with MAUI tree grids, SfTreeGrid, hierarchical data binding, tree grid columns, sorting, filtering, selection, freeze panes, or expander customization.

概览

发布者syncfusion
代码仓库maui-ui-components-skills
技能名称syncfusion-maui-treegrid
星标数
61
复刻数
1
附带文件
10
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 10 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 syncfusion 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Syncfusion Maui Treegrid AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/syncfusion/maui-ui-components-skills/tree/master/skills/syncfusion-maui-treegrid
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/syncfusion/maui-ui-components-skills.git /tmp/maui-ui-components-skills
mkdir -p .claude/skills
cp -r /tmp/maui-ui-components-skills/skills/syncfusion-maui-treegrid .claude/skills/syncfusion-maui-treegrid
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Syncfusion Maui Treegrid,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Syncfusion Maui Treegrid。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Syncfusion Maui Treegrid 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Implementing .NET MAUI Tree Grid

A skill for implementing and customizing the Syncfusion .NET MAUI Tree Grid (SfTreeGrid) control. The Tree Grid displays and manipulates hierarchical data in a tabular view, combining the clarity of a grid with the ability to present parent-child relationships in an organized structure. Built for excellent performance, it handles large datasets efficiently while maintaining smooth interaction.

When to Use This Skill

Use this skill when you need to:

  • Display hierarchical or self-relational data in a .NET MAUI app
  • Bind nested collections or self-referencing data sources to a tree grid
  • Configure tree grid columns (auto-generated or manually defined)
  • Choose and configure column types (Text, Numeric, Date, CheckBox, Template)
  • Apply column sizing modes (Fill, Auto, LastColumnFill, FitByCell, FitByHeader)
  • Sort or filter hierarchical data
  • Freeze columns for navigation across wide datasets
  • Implement row selection (Single, Multiple, SingleDeselect, None)
  • Customize the expander column (icon, width, placement, initial expansion state)
  • Style cells, headers, and rows (DefaultStyle, implicit styling, grid lines)
  • Expand/collapse nodes programmatically

Component Overview

SfTreeGrid is a high-performance hierarchical data grid for .NET MAUI that provides:

Core Features:

  • Two data binding modes — self-relational (ParentPropertyName/ChildPropertyName) and nested collection (ChildPropertyName)
  • Rich column types — Text, Numeric, Date, CheckBox, Template
  • Auto-generated or manually defined columns
  • Data operations — sorting (single/multi-column, tri-state, custom) and filtering (programmatic, condition-based)
  • Freeze panes — left and right column freezing
  • Selection — Single, Multiple, SingleDeselect, None
  • Expander customization — icon templates, column placement, width, model-driven expansion state
  • Styling — column-level, implicit (TargetType), DefaultStyle, grid line control

NuGet Package: Syncfusion.Maui.TreeGrid

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Prerequisites and project setup (.NET 9 SDK, Visual Studio 2022 v17.12+)
  • Installing the Syncfusion.Maui.TreeGrid NuGet package
  • Registering the Syncfusion core handler in MauiProgram.cs
  • Defining data models and ViewModels
  • Basic TreeGrid implementation (XAML and C#)
  • Importing the TreeGrid namespace

Data Binding

📄 Read: references/data-binding.md

  • Binding self-relational data (ParentPropertyName, ChildPropertyName, SelfRelationRootValue)
  • Binding nested collections (ChildPropertyName)
  • Binding IEnumerable sources
  • AutoExpandMode (None, RootNodesExpanded, AllNodesExpanded)
  • Programmatic node expansion (ExpandAllNodes, ExpandNode, by level/index/business object)
  • Programmatic node collapse (CollapseAllNodes, CollapseNode)
  • NodeExpanding and NodeCollapsing events
  • IsExpanded property on TreeNode

Columns

📄 Read: references/columns.md

  • Automatic column generation (AutoGenerateColumnsMode)
  • Auto-generation modes (None, Reset, ResetAll, RetainOld, SmartReset)
  • Customizing auto-generated columns (AutoGeneratingColumn event)
  • Manually generating columns
  • Column manipulation (add, access, clear, remove)
  • Column-to-data-type mapping

Column Types

📄 Read: references/column-types.md

  • TreeGridColumn base properties (MappingName, HeaderText, Width, Format)
  • TreeGridTextColumn, TreeGridNumericColumn, TreeGridDateColumn, TreeGridCheckBoxColumn, TreeGridTemplateColumn
  • DisplayBinding and value converters
  • Text alignment (HeaderTextAlignment, CellTextAlignment)
  • Padding (HeaderPadding, CellPadding)
  • Header customization (HeaderText, HeaderTemplate)
  • Hiding columns (Visible)
  • Formatting values (C2, N2, P2, date formats)

Column Sizing

📄 Read: references/column-sizing.md

  • ColumnWidthMode options (Fill, Auto, LastColumnFill, FitByCell, FitByHeader, None)
  • DefaultColumnWidth
  • Retrieving auto-calculated width (ActualWidth)
  • Per-column ColumnWidthMode
  • Minimum and maximum column widths (MinimumWidth, MaximumWidth)

Expander Customization

📄 Read: references/expander-customization.md

  • Loading expander icon through DataTemplate (ExpanderIcon)
  • Using DataTemplateSelector for expanded/collapsed icons
  • Changing the expander column (ExpanderColumn)
  • Customizing expander column width (ExpanderWidth)
  • Controlling initial expansion through a model property (ExpandStateMappingName)

Sorting & Filtering

📄 Read: references/sorting-filtering.md

  • Programmatic sorting (SortColumnDescriptions, SortColumnDescription)
  • Sorting modes (Single, Multiple, None)
  • Tri-state sorting (AllowTriStateSorting)
  • Showing sort numbers (ShowSortNumbers)
  • Sorting gesture (tap vs double-tap, SortingGestureType)
  • Sorting events (SortColumnsChanging, SortColumnsChanged)
  • Disabling sorting per column (AllowSorting)
  • Custom sorting (SortComparers, IComparer, ISortDirection)
  • Filter levels (Root, All, Extended)
  • Programmatic view filtering (View.Filter, View.RefreshFilter)
  • Condition-based filtering (Equals, Contains, Does Not Equal)
  • Clearing filters

Selection

📄 Read: references/selection.md

  • Selection modes (None, Single, Multiple, SingleDeselect)
  • Getting selected rows (SelectedIndex, SelectedRow, SelectedRows)
  • Programmatic selection (index, row, multiple rows, SelectAll)
  • Clearing selection (SelectionMode.None, ClearSelection)
  • Selection events (SelectionChanging, SelectionChanged)
  • Customizing selection appearance (SelectionBackground, SelectedRowTextColor)
  • Binding selection properties to ViewModel

Freeze Panes

📄 Read: references/freeze-panes.md

  • Freezing left columns (FrozenColumnCount)
  • Freezing right/footer columns (FooterFrozenColumnCount)
  • Freeze pane line color (FreezePaneLineColor)
  • Freeze pane line thickness (FreezePaneLineStrokeThickness)

Styling

📄 Read: references/styling.md

  • Column cell styling (CellStyle)
  • Column header styling (HeaderStyle)
  • Implicit styling (TreeGridCell, TreeGridExpanderCell, TreeGridHeaderCell, TreeGridRow, TreeGridHeaderRow)
  • DefaultStyle (HeaderRowBackground, RowBackground, RowTextColor)
  • Applying styles from app/page resources
  • Grid line visibility (Both, Horizontal, Vertical, None)
  • Grid line color and stroke customization
  • Styling priority order

Quick Start

A minimal TreeGrid bound to a nested collection:

csharp
using Syncfusion.Maui.TreeGrid;
using System.Collections.ObjectModel;

public class EmployeeInfo
{
    public string? FirstName { get; set; }
    public string? LastName { get; set; }
    public double Salary { get; set; }
    public ObservableCollection<EmployeeInfo> Children { get; set; } = new();
}

SfTreeGrid treeGrid = new SfTreeGrid();
treeGrid.ItemsSource = new ObservableCollection<EmployeeInfo>
{
    new EmployeeInfo
    {
        FirstName = "James", LastName = "Smith", Salary = 2000000,
        Children = new ObservableCollection<EmployeeInfo>
        {
            new EmployeeInfo { FirstName = "Andrew", LastName = "Fuller", Salary = 1200000 }
        }
    }
};
treeGrid.ChildPropertyName = "Children";
this.Content = treeGrid;

Namespace (XAML):

xaml
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.TreeGrid;assembly=Syncfusion.Maui.TreeGrid"

Don't forget to register the Syncfusion core handler in MauiProgram.cs:

csharp
builder.ConfigureSyncfusionCore();

Forgetting ConfigureSyncfusionCore() causes runtime errors when rendering the TreeGrid.

Common Patterns

Display hierarchical data with a specific column

xaml
<syncfusion:SfTreeGrid x:Name="treeGrid"
                       ItemsSource="{Binding EmployeeCollection}"
                       ChildPropertyName="Children"
                       AutoGenerateColumnsMode="None">
    <syncfusion:SfTreeGrid.Columns>
        <syncfusion:TreeGridTextColumn HeaderText="First Name" MappingName="FirstName" />
        <syncfusion:TreeGridTextColumn HeaderText="Last Name" MappingName="LastName" />
        <syncfusion:TreeGridNumericColumn HeaderText="Salary" MappingName="Salary" Format="C2" />
    </syncfusion:SfTreeGrid.Columns>
</syncfusion:SfTreeGrid>

Bind self-relational data

csharp
treeGrid.ItemsSource = employeeViewModel.Employees;
treeGrid.ParentPropertyName = "ID";
treeGrid.ChildPropertyName = "ReportsTo";
treeGrid.SelfRelationRootValue = -1;
treeGrid.AutoExpandMode = TreeGridExpandMode.RootNodesExpanded;

Apply default styling

csharp
treeGrid.DefaultStyle.HeaderRowBackground = Color.FromArgb("#0074E3");
treeGrid.DefaultStyle.HeaderRowTextColor = Colors.White;
treeGrid.DefaultStyle.RowBackground = Color.FromArgb("#AFD5FB");
treeGrid.DefaultStyle.RowTextColor = Color.FromArgb("#212121");

Choosing the right reference

User wants to...Read
Set up the TreeGrid for the first timereferences/getting-started.md
Bind self-relational or nested datareferences/data-binding.md
Auto-generate or manually define columnsreferences/columns.md
Pick a column type or format cell valuesreferences/column-types.md
Control column widths automaticallyreferences/column-sizing.md
Customize the expand/collapse icon or columnreferences/expander-customization.md
Sort or filter hierarchical datareferences/sorting-filtering.md
Select rows or respond to selection changesreferences/selection.md
Keep columns visible during horizontal scrollreferences/freeze-panes.md
Style cells, headers, rows, or grid linesreferences/styling.md

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Syncfusion Maui Treegrid AI 技能有什么作用?

Implement and customize Syncfusion .NET MAUI Tree Grid (SfTreeGrid) for displaying and manipulating hierarchical data in a tabular view. Use when working with MAUI tree grids, SfTreeGrid, hierarchical data binding, tree grid columns, sorting, filtering, selection, freeze panes, or expander customization.

为什么在 TypingMind 中使用 Syncfusion Maui Treegrid?

因为您只需安装一次,就能搭配任何模型使用。Syncfusion Maui Treegrid 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Syncfusion Maui Treegrid?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/syncfusion/maui-ui-components-skills/tree/master/skills/syncfusion-maui-treegrid。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Syncfusion Maui Treegrid?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Syncfusion Maui Treegrid 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Syncfusion Maui Treegrid 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Syncfusion Maui Treegrid AI 技能免费吗?

syncfusion 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇