[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]MVVM Framework
    Getting Started
    Services in ViewModelBase descendants
    Services in POCO objects
    Services in custom ViewModels
    View creation mechanisms
   [Collapse]Predefined Set
    [Expand]Dialog Services
    [Expand]Message Box Services
    [Expand]Document Services
    [Expand]Report Services
    How to create a Custom Service
   Data Annotation Attributes
   Weak Event
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


TaskbarButtonService is a ITaskbarButtonService implementation that allows you to customize an application taskbar button.

The image below demonstrates possible variants of taskbar button customization.

Expanded Getting started with TaskbarButtonService

Assume that you need to dynamically animate a progress bar or modify the taskbar button background to, for instance, set it to red (error), yellow (pause), etc. To accomplish this task, you can use the TaskbarButtonService class.

Define the TaskbarButtonService in the Interaction.Behaviors collection.

The TaskbarButtonService defined in the code snippet above displays a progress bar which represents the View Model's ProgressValue property value.

The TaskbarButtonService's properties can be set from XAML, but since they're meant to be updated at runtime, setting them directly in code often makes more sense.

To learn how to obtain the TaskbarButtonService if ViewModel is a POCO object, see Services in POCO objects. If it's a ViewModelBase descendant, refer to Services in ViewModelBase descendants.

Suppose we have a POCO View Model defined in the following manner.

In this case, you can add extra properties to the View Model and change the states of the TaskbarButtonServices states, depending on the newly added property values. Consider the following example.

The resulting taskbar button is shown in the screenshot below.

Expanded Defining Thumb Buttons

To customize the thumb buttons of the taskbar, use the TaskbarButtonService.ThumbButtonInfos property.

The TaskbarThumbButtonInfo class implements the functionality of an individual button that can be displayed within the thumb button of the taskbar.

TaskbarThumbButtonInfo provides the following properties.

  • Action - gets or sets the Action called when thumb button is clicked.
  • Command - gets or sets the command to invoke when this thumbnail button is clicked.
  • CommandParameter - gets or sets the parameter to pass to the Command property.
  • Description - gets or sets the text to display for the thumbnail button tooltip.
  • DismissWhenClicked - gets or sets a value that indicates whether to close the taskbar thumbnail when the thumbnail button is clicked.
  • ImageSource - gets or sets the image that is displayed on the thumbnail button.
  • IsBackgroundVisible - gets or sets a value that indicates whether a border and highlight are displayed around the thumbnail button.
  • IsEnabled - gets or sets a value that indicates whether the thumbnail button is enabled.
  • IsInteractive - gets or sets a value that indicates whether the user can interact with the thumbnail button.
  • Visibility - gets or sets a value that specifies the display state of the thumbnail button.

Expanded Clipping Thumbnail Image

If you need to call a user's attention to a relevant section of the application window, use the TaskbarButtonService.ThumbnailClipMargin property to control the window clipping of the thumbnail image and handle the TaskbarButtonService.ThumbnailClipMarginCallback event raised when the window is resized.

The following image is an example of clipping. The original window thumbnail is on the left and the clipped version is on the right.

Expanded Showing an Icon over the Taskbar Button

To show an icon over the taskbar button, use the TaskbarButtonService.OverlayIcon property.

Expanded Example

Is this topic helpful?​​​​​​​