
syncfusion-wpf-treeview
Comprehensive guide for implementing Syncfusion WPF TreeView (SfTreeView) control to display hierarchical data in Windows Presentation Foundation applications. Use this when working with tree structures, folder hierarchies, organizational charts, or parent-child data relationships. Supports drag-and-drop reordering, checkbox selection, load-on-demand for large datasets, and inline editing of tree nodes.
- Installs
- 154
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-treeview- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads syncfusion-wpf-treeview automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Implementing Syncfusion WPF TreeView (SfTreeView)
The Syncfusion WPF TreeView (SfTreeView) is a powerful data-oriented control for displaying hierarchical data in a tree structure with expanding and collapsing nodes. It's commonly used to display folder structures, organizational hierarchies, category trees, and nested relationships in WPF applications.
When to Use This Skill
Use this skill when you need to:
- Display hierarchical data in a tree structure (folders, categories, org charts)
- Implement expandable/collapsible nodes with parent-child relationships
- Enable selection in tree structures (single or multiple items)
- Add checkbox functionality to tree nodes with recursive state management
- Support drag-and-drop for reordering or reorganizing tree items
- Enable inline editing of tree node content
- Load data on demand for large hierarchical datasets
- Bind data to TreeView from collections (bound or unbound modes)
- Customize appearance with templates, themes, and visual styles
- Display tree lines to visualize hierarchical relationships
- Perform CRUD operations on tree data dynamically
This skill provides comprehensive guidance for all TreeView features, from basic setup to advanced customization.
Component Overview
Key Capabilities:
- Data Binding Modes: Bound (data source) and Unbound (manual nodes)
- Selection: Single, Multiple, Extended with keyboard navigation
- Checkboxes: Individual or recursive state management
- Drag & Drop: Within TreeView or to other controls
- Editing: Inline editing with templates and validation
- Load on Demand: Lazy loading for performance with large datasets
- Customization: Full template support for items, expanders, and editing
- Tree Lines: Visual indicators for hierarchical structure
- Performance: Optimized view reuse and flat rendering architecture
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and assembly deployment
- NuGet package setup (Syncfusion.SfTreeView.WPF)
- Required assembly references
- Namespace imports (XAML and C#)
- Creating basic TreeView in XAML
- Creating TreeView programmatically
- License configuration
Data Population
📄 Read: references/data-population.md
- Unbound mode (TreeViewNode objects)
- Bound mode (hierarchical data source binding)
- ChildPropertyName for nested collections
- HierarchyPropertyDescriptors for complex hierarchies
- ItemTemplate configuration
- ItemsSource binding patterns
- Data binding with MVVM
Selection
📄 Read: references/selection.md
- Selection modes (None, Single, SingleDeselect, Multiple, Extended)
- UI selection with mouse and keyboard
- Programmatic selection (SelectedItem, SelectedItems)
- Binding selection state to data model
- Selection events (SelectionChanging, SelectionChanged)
- CurrentItem property
- Keyboard navigation
Checkboxes
📄 Read: references/checkboxes.md
- Adding checkboxes to tree items
- CheckBoxMode (None, Default, Recursive)
- CheckedItems collection binding
- Recursive checkbox state propagation
- Programmatic check/uncheck
- ItemTemplateDataContextType configuration
- Checkbox in bound and unbound modes
Editing
📄 Read: references/editing.md
- Enabling editing (AllowEditing property)
- Edit triggers (F2 key, single click, double click)
- EditTemplate and EditTemplateSelector
- Programmatic editing (BeginEdit, EndEdit)
- Editing events and validation
- Committing and reverting changes
- Edit mode in bound and unbound modes
Drag and Drop
📄 Read: references/drag-and-drop.md
- Enabling drag and drop (AllowDragging)
- Dragging multiple selected items
- Drop position indicators
- Drag and drop events (ItemDragStarting, ItemDragOver, ItemDropping, ItemDropped)
- Dragging between TreeViews
- Drag to other controls (ListView, DataGrid)
- Customizing drag behavior
Tree Structure Features
📄 Read: references/tree-structure.md
- Expanding and collapsing nodes
- AutoExpandMode property
- ExpandActionTrigger (Node, Expander)
- Load on demand for lazy loading
- Tree lines visualization (ShowLines property)
- Expander template customization
- Programmatic expand/collapse
- ExpanderTemplate
Appearance and Customization
📄 Read: references/appearance.md
- Item height customization
- ItemTemplate and ItemTemplateSelector
- Visual states and styling
- Theming with SfSkinManager
- Custom expander icons
- Indentation and spacing control
- Border and background customization
- FullRowSelect property
CRUD Operations
📄 Read: references/crud-operations.md
- Adding nodes programmatically
- Removing nodes from TreeView
- Updating node content
- CRUD in bound vs unbound mode
- Refreshing data and UI updates
- Collection change handling
Quick Start Example
Basic Unbound TreeView
<Window 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"
xmlns:Engine="clr-namespace:Syncfusion.UI.Xaml.TreeView.Engine;assembly=Syncfusion.SfTreeView.WPF">
<Grid>
<syncfusion:SfTreeView x:Name="treeView" Width="300">
<syncfusion:SfTreeView.Nodes>
<Engine:TreeViewNode Content="Documents" IsExpanded="True">
<Engine:TreeViewNode.ChildNodes>
<Engine:TreeViewNode Content="Reports"/>
<Engine:TreeViewNode Content="Invoices"/>
</Engine:TreeViewNode.ChildNodes>
</Engine:TreeViewNode>
<Engine:TreeViewNode Content="Pictures" IsExpanded="True">
<Engine:TreeViewNode.ChildNodes>
<Engine:TreeViewNode Content="Vacation"/>
<Engine:TreeViewNode Content="Family"/>
</Engine:TreeViewNode.ChildNodes>
</Engine:TreeViewNode>
</syncfusion:SfTreeView.Nodes>
</syncfusion:SfTreeView>
</Grid>
</Window>
Basic Bound TreeView
<syncfusion:SfTreeView x:Name="treeView"
ItemsSource="{Binding Folders}"
ChildPropertyName="SubFolders"
AutoExpandMode="RootNodes">
<syncfusion:SfTreeView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding FolderName}"
VerticalAlignment="Center"/>
</DataTemplate>
</syncfusion:SfTreeView.ItemTemplate>
</syncfusion:SfTreeView>
// ViewModel
public class ViewModel : INotifyPropertyChanged
{
public ObservableCollection<Folder> Folders { get; set; }
public ViewModel()
{
Folders = new ObservableCollection<Folder>
{
new Folder
{
FolderName = "Documents",
SubFolders = new ObservableCollection<Folder>
{
new Folder { FolderName = "Reports" },
new Folder { FolderName = "Invoices" }
}
}
};
}
}
public class Folder : INotifyPropertyChanged
{
public string FolderName { get; set; }
public ObservableCollection<Folder> SubFolders { get; set; }
}
Common Patterns
TreeView with Selection and Checkboxes
<syncfusion:SfTreeView x:Name="treeView"
ItemsSource="{Binding Items}"
ChildPropertyName="Children"
SelectionMode="Multiple"
CheckBoxMode="Recursive"
CheckedItems="{Binding CheckedItems}"
ItemTemplateDataContextType="Node">
<syncfusion:SfTreeView.ItemTemplate>
<DataTemplate>
<Grid>
<CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}"
FocusVisualStyle="{x:Null}"/>
<TextBlock Text="{Binding Content.Name}"
Margin="25,0,0,0"
VerticalAlignment="Center"/>
</Grid>
</DataTemplate>
</syncfusion:SfTreeView.ItemTemplate>
</syncfusion:SfTreeView>
TreeView with Load on Demand
<syncfusion:SfTreeView x:Name="treeView"
ItemsSource="{Binding Items}"
ChildPropertyName="Children"
LoadOnDemandCommand="{Binding LoadOnDemandCommand}"/>
public class TreeViewViewModel
{
public ICommand LoadOnDemandCommand { get; }
public TreeViewViewModel()
{
LoadOnDemandCommand = new RelayCommand(LoadChildren);
}
private void LoadChildren(object param)
{
var node = param as TreeViewNode;
if (node.ChildNodes.Count == 0)
{
node.PopulateChildNodes(new List<MyModel>
{
new MyModel { Name = "Child 1" },
new MyModel { Name = "Child 2" }
});
node.IsExpanded = true;
}
}
}
public class MyModel
{
public string Name { get; set; }
// Used for hierarchical binding (important for TreeView)
public List<MyModel> Children { get; set; }
}
TreeView with Drag and Drop
<syncfusion:SfTreeView x:Name="treeView"
ItemsSource="{Binding Items}"
ChildPropertyName="Children"
AllowDragging="True"
SelectionMode="Multiple"
ItemDropping="TreeView_ItemDropping"/>
private void TreeView_ItemDropping(object sender, TreeViewItemDroppingEventArgs e)
{
// Validate drop operation
if (!IsValidDrop(e.TargetNode, e.DraggingNodes))
{
e.Handled = true; // Cancel drop
}
}
Key Properties
| Property | Type | Description |
|---|---|---|
ItemsSource | IEnumerable | Data source for bound mode |
ChildPropertyName | string | Property name for child collection |
SelectionMode | SelectionMode | Single, Multiple, Extended, etc. |
SelectedItem | object | Currently selected item |
SelectedItems | ObservableCollection | Multiple selected items |
CheckBoxMode | CheckBoxMode | None, Default, Recursive |
CheckedItems | ObservableCollection | Checked items collection |
AllowDragging | bool | Enable drag and drop |
AllowEditing | bool | Enable inline editing |
AutoExpandMode | AutoExpandMode | AllNodes, RootNodes, None |
ExpandActionTrigger | ExpandActionTrigger | Node or Expander click |
ShowLines | bool | Display tree lines |
ItemTemplate | DataTemplate | Template for item display |
EditTemplate | DataTemplate | Template for editing mode |
ExpanderTemplate | DataTemplate | Template for expander icon |
Common Use Cases
File Explorer
Display folder and file hierarchies with icons, allowing users to navigate, select, and manage files with drag-and-drop.
Organizational Chart
Show company hierarchy with employee nodes, supporting selection and expansion to view team structures.
Category Management
Display product categories with checkboxes for multi-selection, enabling bulk operations on category trees.
Project Structure
Show project files and folders with load-on-demand for large projects, supporting inline editing of file names.
Settings/Preferences Tree
Display nested configuration options with checkboxes for enabling/disabling features hierarchically.
Menu/Navigation Tree
Create hierarchical navigation menus with expandable sections and visual tree lines.
Next Steps: Navigate to the specific reference documentation above based on the feature you need to implement. Start with getting-started.md for initial setup, then explore other features as needed.
FAQ
What does the syncfusion-wpf-treeview skill do?
Comprehensive guide for implementing Syncfusion WPF TreeView (SfTreeView) control to display hierarchical data in Windows Presentation Foundation applications. Use this when working with tree structures, folder hierarchies, organizational charts, or parent-child data relationships. Supports drag-and-drop reordering, checkbox selection, load-on-demand for large datasets, and inline editing of tree nodes.
How do I install syncfusion-wpf-treeview?
Run npx skills add https://github.com/syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-treeview in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-wpf-treeview/ (personal) or .claude/skills/syncfusion-wpf-treeview/ (project).
Which AI agents can use syncfusion-wpf-treeview?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is syncfusion-wpf-treeview safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains syncfusion-wpf-treeview?
It is published by syncfusion in syncfusion/wpf-ui-components-skills. It has 154 recorded installs.
More from syncfusion/wpf-ui-components-skills
syncfusion-wpf-theming
syncfusion/wpf-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-wpf-datagrid
syncfusion/wpf-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-wpf-carousel
syncfusion/wpf-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-wpf-button
syncfusion/wpf-ui-components-skills
Implement Syncfusion WPF ButtonAdv controls for configurable button UIs. Use this when adding, configuring, or customizing a Syncfusion WPF ButtonAdv — including labels, icons, size modes, toggle/checkable behavior, MVVM command binding, multiline text, corner radius, IsDefault/IsCancel modes, icon templates, and themes.
syncfusion-wpf-combobox
syncfusion/wpf-ui-components-skills
Open the skill to read its SKILL.md instructions.
syncfusion-wpf-licensing
syncfusion/wpf-ui-components-skills
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.