Skip to main content

syncfusion-wpf-taskbar

Implement Syncfusion WPF TaskBar for Windows Explorer-style grouped task panels with collapsible TaskBarItem sections. Use this when building grouped collapsible panels, Windows XP-style sidebars, or expandable action panel sections in WPF. Covers TaskBarItem, GroupMargin, GroupPadding, GroupWidth, GroupOrientation, IsOpened, ButtonSize, and animation speed configuration.

来源信息

仓库
syncfusion/wpf-ui-components-skills
最近来源活动
2026年7月6日 07:21
检测到的 SKILL.md 语言
英语
星标
5
Forks
2

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
5 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
syncfusion-wpf-taskbar
description
Implement Syncfusion WPF TaskBar for Windows Explorer-style grouped task panels with collapsible TaskBarItem sections. Use this when building grouped collapsible panels, Windows XP-style sidebars, or expandable action panel sections in WPF. Covers TaskBarItem, GroupMargin, GroupPadding, GroupWidth, GroupOrientation, IsOpened, ButtonSize, and animation speed configuration.
metadata
{"author":"Syncfusion Inc","version":"34.1.29"}
# Implementing WPF TaskBar The **TaskBar** control provides a Windows Explorer-style task panel UI — grouped collapsible sections (`TaskBarItem`) that can hold any WPF content. Ideal for action panels, property groups, navigation sidebars, and tool panels. **Assembly required:** - `Syncfusion.Tools.WPF` - `Syncfusion.Shared.WPF` **XAML namespace:** ```xml xmlns:syncfusion="http://schemas.syncfusion.com/wpf" ``` **C# namespace:** ```csharp using Syncfusion.Windows.Tools.Controls; ``` --- ## When to Use This Skill | Scenario | Use TaskBar | |----------|------------| | Windows Explorer-style grouped action panel | ✅ Yes | | Collapsible sidebar with grouped items | ✅ Yes | | WPF tool panel with categorized sections | ✅ Yes | | Simple tab control | ❌ Use TabControl | | Navigation sidebar with drill-down | ❌ Use GroupBar or SfTreeNavigator | --- ## Documentation and Navigation Guide ### Getting Started 📄 **Read:** [references/getting-started.md](references/getting-started.md) - Assembly and NuGet setup - Adding TaskBar via XAML and C# - Adding a TaskBarItem with a Header - Adding content (text, panels) to TaskBarItem ### Items and Content 📄 **Read:** [references/items-and-content.md](references/items-and-content.md) - TaskBarItem Items collection (any UIElement) - Custom header with image (DockPanel + Image + TextBlock) - Collapse/expand with `IsOpened` attached property - Animation speed (`Speed` attached property) - Expander button size (`ButtonSize` attached property) ### Layout and Orientation 📄 **Read:** [references/layout-and-orientation.md](references/layout-and-orientation.md) - `GroupOrientation`: Horizontal vs Vertical - `GroupOrientationChanged` event - `GroupMargin`: spacing between items - `GroupPadding`: internal content padding - `GroupWidth`: uniform item width - `FlowDirection`: LeftToRight / RightToLeft ### Appearance and Visual Styles 📄 **Read:** [references/appearance.md](references/appearance.md) - `SkinStorage.SetVisualStyle()` — applying built-in visual styles - All available style names (Office2007, Blend, Metro, VS2010, etc.) --- ## Quick Start Example **Minimal TaskBar with two groups (XAML):** ```xml <Window x:Class="MyApp.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" Title="MainWindow" Height="450" Width="300"> <Grid> <syncfusion:TaskBar Name="taskBar" GroupMargin="5"> <syncfusion:TaskBarItem Header="File Tasks"> <StackPanel Margin="10"> <TextBlock Text="Open a file" /> <TextBlock Text="Save the file" /> </StackPanel> </syncfusion:TaskBarItem> <syncfusion:TaskBarItem Header="Edit Tasks"> <StackPanel Margin="10"> <TextBlock Text="Copy" /> <TextBlock Text="Paste" /> </StackPanel> </syncfusion:TaskBarItem> </syncfusion:TaskBar> </Grid> </Window> ``` **C# equivalent:** ```csharp TaskBar taskBar = new TaskBar(); taskBar.GroupMargin = new Thickness(5); TaskBarItem item1 = new TaskBarItem() { Header = "File Tasks" }; item1.Items.Add(new TextBlock() { Text = "Open a file" }); taskBar.Items.Add(item1); TaskBarItem item2 = new TaskBarItem() { Header = "Edit Tasks" }; item2.Items.Add(new TextBlock() { Text = "Copy" }); taskBar.Items.Add(item2); this.Content = taskBar; ``` --- ## Common Patterns ### Collapse all groups on load ```xml <syncfusion:TaskBar Name="taskBar" syncfusion:TaskBar.IsOpened="False"> <syncfusion:TaskBarItem Header="Tasks" /> </syncfusion:TaskBar> ``` ### Horizontal layout (groups side by side) ```xml <syncfusion:TaskBar GroupOrientation="Horizontal" GroupMargin="5"> ... </syncfusion:TaskBar> ``` ### Custom header with icon ```xml <syncfusion:TaskBarItem> <syncfusion:TaskBarItem.Header> <DockPanel> <Image Height="16" Width="16" Source="icon.png" /> <TextBlock Foreground="White" Margin="5,0,0,0" Text="My Group" /> </DockPanel> </syncfusion:TaskBarItem.Header> ... </syncfusion:TaskBarItem> ``` ### Apply visual style ```csharp SkinStorage.SetVisualStyle(taskBar, "Office2007Blue"); ``` --- ## Key Properties | Property | On | Type | Description | |----------|----|------|-------------| | `Header` | `TaskBarItem` | `object` | Group header label (supports templates) | | `Items` | `TaskBarItem` | collection | Content items in the group | | `GroupMargin` | `TaskBar` | `Thickness` | Margin between all TaskBarItems | | `GroupWidth` | `TaskBar` | `double` | Uniform width for all TaskBarItems | | `GroupOrientation` | `TaskBar` | `Orientation` | `Vertical` (default) or `Horizontal` | | `FlowDirection` | `TaskBar` | `FlowDirection` | `LeftToRight` or `RightToLeft` | | `IsOpened` | attached on `TaskBar` | `bool` | Expand (`true`) or collapse (`false`) all items | | `TaskBar.Speed` | attached | `double` | Animation speed for expand/collapse | | `TaskBar.ButtonSize` | attached | `double` | Height of the expander button | | `TaskBar.GroupPadding` | attached | `Thickness` | Padding inside each TaskBarItem |
在 GitHub 查看