windowsforms-114579-controls-and-libraries-forms-and-user-controls-taskbar-assistant.md
The Taskbar Assistant component allows you to customize an application’s button displayed within the Windows taskbar. You can also create custom Jump Lists (when you right-click the taskbar button), add command categories to Jump Lists, add buttons to the toolbar in the thumbnail preview, and display a progress bar and overlay icons.
The Jump List can contain the following UI elements:
When you hover over an application taskbar button, the Taskbar Assistant displays a live thumbnail preview. The preview window can contain a toolbar with up to seven buttons below the preview image (see the screenshot below).
Read the following topic in MSDN for detailed information about the taskbar features: Taskbar Extensions (MSDN).
The Taskbar Assistant component ships with the Task Category collection editor integrated into the Visual Studio IDE. The collection editor allows you to easily create and customize tasks, and reorder or remove existing tasks.
Use the JumpListTasksCategory property to access and manage items (tasks) displayed within the Tasks category in code.
using DevExpress.Utils.Taskbar;
using DevExpress.Utils.Taskbar.Core;
taskbarAssistant1.BeginUpdate();
// Creates a task.
JumpListItemTask task = new JumpListItemTask();
task.Caption = "DevExpress Universal Subscription";
task.Description = "Our most comprehensive software development package.";
task.Path = "https://www.devexpress.com/subscriptions/universal.xml";
task.ShowCommand = WindowShowCommand.Show;
// Adds the task to the Tasks category.
taskbarAssistant1.JumpListTasksCategory.Add(task);
taskbarAssistant1.EndUpdate();
Imports DevExpress.Utils.Taskbar
Imports DevExpress.Utils.Taskbar.Core
taskbarAssistant1.BeginUpdate()
' Creates a task.
Dim task As New JumpListItemTask()
task.Caption = "DevExpress Universal Subscription"
task.Description = "Our most comprehensive software development package."
task.Path = "https://www.devexpress.com/subscriptions/universal.xml"
task.ShowCommand = WindowShowCommand.Show
' Adds the task to the Tasks category.
taskbarAssistant1.JumpListTasksCategory.Add(task)
taskbarAssistant1.EndUpdate()
The Taskbar Assistant can also display multiple custom categories. Use its Jump List Editor to create custom categories with custom tasks at design time.
Use the JumpListCustomCategories property to access a collection with custom categories in code.
using DevExpress.Utils.Taskbar;
using DevExpress.Utils.Taskbar.Core;
taskbarAssistant1.BeginUpdate();
// Creates a custom category.
JumpListCategory jumpListCategory = new JumpListCategory("Become a UI Superhero");
// Creates a new task.
JumpListItemTask task = new JumpListItemTask();
task.Caption = "DevExpress Universal Subscription";
task.Description = "Our most comprehensive software development package.";
task.Path = "https://www.devexpress.com/subscriptions/universal.xml";
task.ShowCommand = DevExpress.Utils.Taskbar.Core.WindowShowCommand.Show;
// Adds the task to the custom category.
jumpListCategory.JumpItems.Add(task);
// Adds the custom category to the 'JumpListCustomCategories' collection.
taskbarAssistant1.JumpListCustomCategories.Add(jumpListCategory);
taskbarAssistant1.EndUpdate();
Imports DevExpress.Utils.Taskbar
Imports DevExpress.Utils.Taskbar.Core
taskbarAssistant1.BeginUpdate()
' Creates a custom category.
Dim jumpListCategory As New JumpListCategory("Become a UI Superhero")
' Creates a new task.
Dim task As New JumpListItemTask()
task.Caption = "DevExpress Universal Subscription"
task.Description = "Our most comprehensive software development package."
task.Path = "https://www.devexpress.com/subscriptions/universal.xml"
task.ShowCommand = DevExpress.Utils.Taskbar.Core.WindowShowCommand.Show
' Adds the task to the custom category.
jumpListCategory.JumpItems.Add(task)
' Adds the custom category to the 'JumpListCustomCategories' collection.
taskbarAssistant1.JumpListCustomCategories.Add(jumpListCategory)
taskbarAssistant1.EndUpdate()
The Taskbar Assistant can display thumbnail buttons. Use the ThumbnailButtons property to access and manage the thumbnail buttons. Handle the Click event to respond to button clicks.
The Taskbar Assistant can communicate the application state and display feedback for data intensive operations. Use the ProgressMode property to specify the type of progress visualization.
| State | Example |
|---|---|
| Normal | |
| Paused | |
| Indeterminate | |
| Error | |
| None | No progress indication. |
Use the ProgressCurrentValue and ProgressMaximumValue properties to configure the progress indication.
The OverlayIcon property specifies an overlay icon. The Taskbar Assistant displays the overlay icon over the application icon.