/syncfusion-winui:syncfusion-winui-treeviewfrom Syncfusion WinUI Controls
Comprehensive guide for implementing Syncfusion WinUI TreeView (SfTreeView) control in desktop applications. Use this skill when working with hierarchical data display, tree structures, or node-based navigation. Covers TreeView implementation for file explorers, organization charts, category browsers, and expandable/collapsible data visualization in WinUI applications.
Ships in Syncfusion WinUI 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® WinUI TreeView (SfTreeView) control to display hierarchical data in Windows App SDK applications.
Use this skill when you need to:
The TreeView control excels at visualizing parent-child relationships and nested data structures.
The SfTreeView is a data-oriented control that displays data in a hierarchical structure with expanding and collapsing nodes. It's commonly used to illustrate folder structures, organizational hierarchies, or nested relationships.
Choose TreeView when you need:
Consider alternatives for:
📄 Read: references/getting-started.md
Start here for initial setup and your first TreeView:
📄 Read: references/data-binding.md
Learn how to bind TreeView to your data models:
📄 Read: references/drag-drop-crud.md
Master node manipulation and CRUD operations:
📄 Read: references/selection.md
Implement node selection functionality:
📄 Read: references/expand-collapse.md
Control node expansion and collapse:
📄 Read: references/editing.md
Enable inline editing of tree nodes:
📄 Read: references/interactivity.md
Add interactive features to your TreeView:
📄 Read: references/mvvm-patterns.md
Implement MVVM architecture with TreeView:
📄 Read: references/appearance-customization.md
Customize the visual appearance:
Here's a minimal TreeView showing a file structure:
XAML:
<Page xmlns:treeView="using:Syncfusion.UI.Xaml.TreeView">
<Page.DataContext>
<local:FileViewModel />
</Page.DataContext>
<treeView:SfTreeView x:Name="treeView"
Width="400"
Height="500"
ChildPropertyName="SubFiles"
ItemsSource="{Binding Files}">
<treeView:SfTreeView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="📁" Margin="0,0,5,0" />
<TextBlock Text="{Binding FileName}"
VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</treeView:SfTreeView.ItemTemplate>
</treeView:SfTreeView>
</Page>
ViewModel (C#):
public class FileViewModel : INotifyPropertyChanged
{
public ObservableCollection<FileNode> Files { get; set; }
public FileViewModel()
{
Files = new ObservableCollection<FileNode>
{
new FileNode
{
FileName = "Documents",
SubFiles = new ObservableCollection<FileNode>
{
new FileNode { FileName = "Resume.docx" },
new FileNode { FileName = "CoverLetter.pdf" }
}
},
new FileNode
{
FileName = "Downloads",
SubFiles = new ObservableCollection<FileNode>()
}
};
}
public event PropertyChangedEventHandler PropertyChanged;
}
public class FileNode : INotifyPropertyChanged
{
private string _fileName;
private ObservableCollection<FileNode> _subFiles;
public string FileName
{
get => _fileName;
set { _fileName = value; OnPropertyChanged(); }
}
public ObservableCollection<FileNode> SubFiles
{
get => _subFiles;
set { _subFiles = value; OnPropertyChanged(); }
}
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
<treeView:SfTreeView ItemsSource="{Binding Items}"
ChildPropertyName="Children">
<treeView:SfTreeView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<FontIcon Glyph="{Binding Icon}"
FontSize="16"
Margin="0,0,8,0" />
<TextBlock Text="{Binding Name}" />
</StackPanel>
</DataTemplate>
</treeView:SfTreeView.ItemTemplate>
</treeView:SfTreeView>
<treeView:SfTreeView SelectionMode="Multiple"
CheckBoxMode="Recursive">
<!-- When parent checked, all children auto-check -->
</treeView:SfTreeView>
<treeView:SfTreeView LoadOnDemandCommand="{Binding LoadChildrenCommand}">
<!-- Children load only when node expands -->
</treeView:SfTreeView>
// Single selection
treeView.SelectedItem = viewModel.RootNode.Children[0];
// Multiple selection
treeView.SelectedItems.Add(node1);
treeView.SelectedItems.Add(node2);
// Select all nodes
treeView.SelectAll();
<treeView:SfTreeView ItemHolding="OnItemHolding">
<!-- Show context menu on right-click/long-press -->
</treeView:SfTreeView>
private void OnItemHolding(object sender, ItemHoldingEventArgs e)
{
var flyout = new MenuFlyout();
flyout.Items.Add(new MenuFlyoutItem { Text = "Rename" });
flyout.Items.Add(new MenuFlyoutItem { Text = "Delete" });
flyout.ShowAt(e.Element);
}
| Property | Type | Description |
|---|---|---|
| ItemsSource | object | Hierarchical data collection to bind |
| ChildPropertyName | string | Property name containing child items |
| SelectionMode | SelectionMode | Selection behavior (None, Single, Multiple, Extended) |
| SelectedItem | object | Currently selected item |
| SelectedItems | ObservableCollection | Collection of selected items |
| AllowEditing | bool | Enable inline editing |
| AllowDragging | bool | Enable drag-and-drop |
| AutoExpandMode | AutoExpandMode | Auto-expand behavior (None, AllNodes, RootNodes) |
| IsAnimationEnabled | bool | Enable expand/collapse animations |
| CheckBoxMode | CheckBoxMode | Checkbox behavior (None, Recursive) |
| LoadOnDemand | bool | Enable lazy loading of child nodes |
| Method | Description |
|---|---|
| ExpandAll() | Expands all nodes in the tree |
| CollapseAll() | Collapses all nodes |
| ExpandNode(TreeViewNode) | Expands specific node |
| CollapseNode(TreeViewNode) | Collapses specific node |
| SelectAll() | Selects all nodes |
| ClearSelection() | Clears all selections |
| BringIntoView(TreeViewNode) | Scrolls to make node visible |
| Event | Description |
|---|---|
| SelectionChanged | Fired when selection changes |
| ItemTapped | Fired when node is tapped |
| ItemDoubleTapped | Fired when node is double-tapped |
| NodeExpanding | Fired before node expands |
| NodeExpanded | Fired after node expands |
| NodeCollapsing | Fired before node collapses |
| NodeCollapsed | Fired after node collapses |
| ItemBeginEdit | Fired when editing starts |
| ItemEndEdit | Fired when editing ends |
Display computer folders and files with expand/collapse, file icons, and context menu operations (rename, delete, copy).
When to use: Document management, file pickers, asset browsers
Key features needed:
Show company hierarchy with departments, teams, and employees with selection to view details.
When to use: HR applications, org visualization, reporting structures
Key features needed:
E-commerce category navigation with expandable categories and subcategories.
When to use: E-commerce, content management, product catalogs
Key features needed:
Hierarchical settings interface with grouped options and expandable sections.
When to use: Application settings, preferences UI, configuration panels
Key features needed:
Display solution structure with projects, folders, and files similar to Visual Studio.
When to use: Developer tools, IDEs, code editors
Key features needed:
| Issue | Solution |
|---|---|
| Nodes not expanding | Check ChildPropertyName matches property name exactly |
| Selection not working | Set SelectionMode to Single or Multiple |
| Data not updating | Implement INotifyPropertyChanged on data models |
| Children not loading | Set NotificationSubscriptionMode to CollectionChanged |
| Poor performance | Enable OnDemand mode and LoadOnDemand |
| Editing not enabled | Set AllowEditing="True" and define EditTemplate |
| Drag-drop not working | Set both AllowDragging and AllowDrop to true |
Next Steps: Read the reference documentation linked above based on your specific needs. Start with getting-started.md if you're new to TreeView.
references/appearance-customization.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/drag-drop-crud.md (opens in a new tab)references/editing.md (opens in a new tab)references/expand-collapse.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/interactivity.md (opens in a new tab)references/mvvm-patterns.md (opens in a new tab)references/selection.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
39 skills in this plugin
/syncfusion-winui-ai-assistviewGuide for implementing the Syncfusion WinUI AI AssistView control for creating AI chat interfaces and conversational UI. Use this skill when implementing AI chat interfaces, AI assistants, conversational UI, or chatbots in WinUI applications. Essential for creating AI-powered chat experiences, integrating AI services, displaying AI responses, showing typing indicators, providing AI suggestions, managing conversation history with a navigation view, customizing empty states with EmptyView/EmptyViewTemplate, or setting input placeholder text in conversational interfaces with AI services in WinUI./syncfusion-winui-autocompleteGuide implementation of the Syncfusion WinUI AutoComplete control (SfAutoComplete) for creating searchable dropdowns with single or multiple selection, filtering suggestions, and customizable token display. Use this skill when implementing search-as-you-type functionality, autocomplete dropdowns with multi-select, tagging systems with token/chip display, or filtered suggestion boxes in WinUI applications./syncfusion-winui-avatar-viewGuide for implementing the Syncfusion WinUI AvatarView control to display user avatars and profile pictures. Use this when implementing user profiles, contact lists, or chat interfaces requiring visual user representation in WinUI applications. This skill covers initials display, image avatars, group avatars, and pre-defined avatar characters.npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-winui