/syncfusion-wpf:syncfusion-wpf-treegridfrom Syncfusion WPF Controls
Comprehensive guide for implementing Syncfusion WPF TreeGrid (SfTreeGrid) control in Windows Presentation Foundation applications. Use this when displaying hierarchical or self-relational data in a grid format with expandable tree structure. Supports column configuration, sorting and filtering hierarchical data, editing tree nodes, cell merging, exporting, and conditional styling.
Ships in Syncfusion WPF Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Comprehensive guide for implementing the Syncfusion® WPF TreeGrid control - a data-oriented control that displays self-relational and hierarchical data in a tree structure with columns. This skill provides complete guidance for setup, data binding, column configuration, interactive features, data operations, styling, and advanced capabilities.
Use this skill when you need to:
This skill is essential for any WPF application that needs to present hierarchical or parent-child data in an interactive, feature-rich grid interface.
The SfTreeGrid control provides:
📄 Read: references/getting-started.md
Start here for initial setup and basic implementation:
Data Binding Approaches
📄 Read: references/data-binding.md
Load-On-Demand
📄 Read: references/load-on-demand.md
Column Basics
📄 Read: references/columns.md
Column Types
📄 Read: references/column-types.md
Column Sizing
📄 Read: references/column-sizing.md
Editing
📄 Read: references/editing.md
Data Validation
📄 Read: references/data-validation.md
Selection
📄 Read: references/selection.md
Cell Merging
📄 Read: references/merge-cells.md
Sorting
📄 Read: references/sorting.md
Filtering
📄 Read: references/filtering.md
Conditional Styling
📄 Read: references/conditional-styling.md
Styles and Templates
📄 Read: references/styles-and-templates.md
Export and Printing
📄 Read: references/export-and-printing.md
Advanced Configuration
📄 Read: references/advanced-features.md
<Window x:Class="TreeGridSample.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">
<syncfusion:SfTreeGrid Name="treeGrid"
AutoGenerateColumns="True"
ChildPropertyName="Children"
ItemsSource="{Binding Employees}"
AllowSorting="True"
AllowFiltering="True"
AllowEditing="True">
</syncfusion:SfTreeGrid>
</Window>
using Syncfusion.UI.Xaml.TreeGrid;
using System.Collections.ObjectModel;
namespace TreeGridSample
{
public class Employee
{
public int EmployeeID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Title { get; set; }
public int ReportsTo { get; set; }
public ObservableCollection<Employee> Children { get; set; }
public Employee()
{
Children = new ObservableCollection<Employee>();
}
}
public class EmployeeViewModel
{
public ObservableCollection<Employee> Employees { get; set; }
public EmployeeViewModel()
{
Employees = new ObservableCollection<Employee>();
PopulateData();
}
private void PopulateData()
{
var ceo = new Employee
{
EmployeeID = 1,
FirstName = "Robert",
LastName = "King",
Title = "CEO"
};
ceo.Children.Add(new Employee
{
EmployeeID = 2,
FirstName = "David",
LastName = "Smith",
Title = "VP of Sales",
ReportsTo = 1
});
ceo.Children.Add(new Employee
{
EmployeeID = 3,
FirstName = "Nancy",
LastName = "Davolio",
Title = "VP of Marketing",
ReportsTo = 1
});
Employees.Add(ceo);
}
}
}
For data where parent-child relationship exists within the same collection:
public class Task
{
public int TaskID { get; set; }
public string TaskName { get; set; }
public int? ParentID { get; set; } // Nullable for root items
}
// ViewModel
public ObservableCollection<Task> Tasks { get; set; }
<syncfusion:SfTreeGrid Name="treeGrid"
ItemsSource="{Binding Tasks}"
ParentPropertyName="ParentID"
SelfRelationRootValue="-1"
ChildPropertyName="TaskID">
</syncfusion:SfTreeGrid>
For data with explicit child collections:
public class Folder
{
public string FolderName { get; set; }
public ObservableCollection<Folder> SubFolders { get; set; }
}
<syncfusion:SfTreeGrid Name="treeGrid"
ItemsSource="{Binding Folders}"
ChildPropertyName="SubFolders">
</syncfusion:SfTreeGrid>
For large datasets where child nodes load when parent expands:
treeGrid.RequestTreeItems += TreeGrid_RequestTreeItems;
private void TreeGrid_RequestTreeItems(object sender, TreeGridRequestTreeItemsEventArgs e)
{
if (e.ParentItem == null)
{
// Load root nodes
e.ChildItems = GetRootNodes();
}
else
{
// Load child nodes for expanded parent
var parent = e.ParentItem as BusinessObject;
e.ChildItems = GetChildNodes(parent.ID);
}
}
<syncfusion:SfTreeGrid ItemsSource="{Binding Employees}"
AutoGenerateColumns="False">
<syncfusion:SfTreeGrid.Columns>
<syncfusion:TreeGridTextColumn HeaderText="Name"
MappingName="FirstName"
Width="150"/>
<syncfusion:TreeGridNumericColumn HeaderText="Age"
MappingName="Age"
NumberDecimalDigits="0"/>
<syncfusion:TreeGridDateTimeColumn HeaderText="DOB"
MappingName="DateOfBirth"
Pattern="ShortDate"/>
<syncfusion:TreeGridCheckBoxColumn HeaderText="Active"
MappingName="IsActive"/>
</syncfusion:SfTreeGrid.Columns>
</syncfusion:SfTreeGrid>
<syncfusion:SfTreeGrid ItemsSource="{Binding Employees}"
ChildPropertyName="Children">
<syncfusion:SfTreeGrid.RecordContextMenu>
<ContextMenu>
<MenuItem Header="Add Child"
Command="{Binding AddChildCommand}"
CommandParameter="{Binding}"/>
<MenuItem Header="Delete"
Command="{Binding DeleteCommand}"
CommandParameter="{Binding}"/>
</ContextMenu>
</syncfusion:SfTreeGrid.RecordContextMenu>
</syncfusion:SfTreeGrid>
public class EmployeeViewModel : INotifyPropertyChanged
{
public ICommand AddChildCommand { get; set; }
public ICommand DeleteCommand { get; set; }
public EmployeeViewModel()
{
AddChildCommand = new RelayCommand(AddChild);
DeleteCommand = new RelayCommand(Delete);
}
private void AddChild(object parameter)
{
var parent = parameter as Employee;
if (parent != null)
{
parent.Children.Add(new Employee { /* ... */ });
}
}
}
| Property | Type | Description |
|---|---|---|
| ItemsSource | IEnumerable | Data source for the TreeGrid |
| ChildPropertyName | string | Property name for child collection |
| ParentPropertyName | string | Property name for parent ID (self-relational) |
| SelfRelationRootValue | object | Value indicating root level nodes |
| AutoGenerateColumns | bool | Auto-generate columns from data source |
| Columns | TreeGridColumns | Collection of column definitions |
| Property | Type | Description |
|---|---|---|
| AllowEditing | bool | Enable/disable cell editing |
| AllowSorting | bool | Enable/disable sorting |
| AllowFiltering | bool | Enable/disable filtering |
| FilterLevel | FilterLevel | Filtering scope (Root, All, Extended) |
| SelectionMode | GridSelectionMode | Selection mode (Single, Multiple, Extended) |
| SelectionUnit | GridSelectionUnit | Selection unit (Row, Cell, Any) |
| AutoExpandMode | AutoExpandMode | Auto-expand behavior (RootNodesExpanded, AllNodesExpanded) |
| ExpanderPosition | ExpanderPosition | Position of expand/collapse icon (Start, End) |
| Property | Type | Description |
|---|---|---|
| GridLinesVisibility | GridLinesVisibility | Grid lines display (Both, Horizontal, Vertical, None) |
| ColumnSizer | GridLengthUnitType | Column auto-sizing strategy |
| RowHeight | double | Height of each row |
| HeaderRowHeight | double | Height of header row |
| IndentColumnWidth | double | Width of indent for each level |
Display organizational structure with employees, managers, and departments in expandable tree format.
Show folders and files in hierarchical structure with load-on-demand for large directory trees.
Display projects, sub-projects, tasks, and subtasks with status tracking, editing, and conditional styling.
Show product assemblies with components, sub-components, quantities, and costs in hierarchical view.
Display product categories, subcategories, and products with filtering, sorting, and export capabilities.
Financial account trees with parent-child relationships, balance calculations, and drill-down capabilities.
Track approval hierarchies with status indicators, conditional styling, and interactive editing.
Display countries, states, cities in hierarchical format with data visualization and export features.
Next Steps: Navigate to the specific reference file above based on your implementation needs. Start with getting-started.md for initial setup, then explore data binding, column configuration, and advanced features as needed.
references/advanced-features.md (opens in a new tab)references/column-sizing.md (opens in a new tab)references/column-types.md (opens in a new tab)references/columns.md (opens in a new tab)references/conditional-styling.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/data-validation.md (opens in a new tab)references/editing.md (opens in a new tab)references/export-and-printing.md (opens in a new tab)references/filtering.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/load-on-demand.md (opens in a new tab)references/merge-cells.md (opens in a new tab)references/selection.md (opens in a new tab)references/sorting.md (opens in a new tab)references/styles-and-templates.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-wpf96 skills in this plugin
/syncfusion-wpf-3d-chartComprehensive guide for implementing Syncfusion WPF 3D Charts (SfChart3D) control for 3D data visualization in Windows Presentation Foundation applications. Use this when working with 3D charts, 3D visualization, or depth axis configurations. This skill covers 3D series types (column, pie, bar), Manhattan charts, 3D rotation, X/Y/Z coordinate plotting, and depth axis configuration for WPF applications./syncfusion-wpf-accordionImplement Syncfusion WPF SfAccordion for collapsible and expandable panel layouts. Use this when working with accordion controls, expandable panels, or collapsible section navigation in WPF. Covers populating items declaratively or via data binding, selection modes (One/OneOrMore/ZeroOrOne/ZeroOrMore), programmatic selection, appearance customization (AccentBrush, HeaderTemplate, ContentTemplate), and theming with SfSkinManager./syncfusion-wpf-ai-assistviewImplement Syncfusion WPF SfAIAssistView for AI chat and conversational assistant interfaces. Use this when building AI assistant UIs, message threads with AI responses, or integrating OpenAI/SemanticKernel in WPF. Covers typing indicators, suggestions, input/response toolbars, stop-responding features, conversation history, input placeholder text, empty view templates, and PromptRequest events using Syncfusion.SfChat.Wpf.Other plugins' skills for the same job