Back to Devexpress

TaskbarAssistant.IconsAssembly Property

windowsforms-devexpress-dot-utils-dot-taskbar-dot-taskbarassistant-e224df2e.md

latest4.0 KB
Original Source

TaskbarAssistant.IconsAssembly Property

Gets or sets the name of the assembly that contains icons (in resources) for Jump List tasks.

Namespace : DevExpress.Utils.Taskbar

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[DefaultValue("")]
[DXCategory("Appearance")]
public string IconsAssembly { get; set; }
vb
<DefaultValue("")>
<DXCategory("Appearance")>
Public Property IconsAssembly As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value that specifies the name of the assembly that contains icons (in resources) for Jump List tasks.

|

Remarks

You can assign icons (ICO files) to Jump List tasks. To do this, first create a resource file containing icons (ICO files) and then use a task’s IconIndex property to assign an icon to the task.

The following tutorial describes these steps in more detail.

  1. Create a resource file that will contain icons.

  2. Select the name of the resource file and the name of the project to which the resource file will be added:

  3. Add icons to the resources.

  4. Create or import an icon(s).

  5. Set the IconsAssembly property to the project that contains the added resource file with icons:

  6. Assign icons to specific tasks via their IconIndex properties:

You can also override the IconsAssembly property setting and specify an individual image source for a particular JumpListItemTask with the JumpListItemTask.IconPath property.

Using a Separate Class Library to Store Icons

You can also use a separate Class Library to store icons. To do this, create a new Class Library in your solution, specify a resource file with icons, add this library to the References section of your project and rebuild the solution. After these steps, you can assign the created Class Library to the TaskbarAssistant.IconsAssembly property and specify task icons with the JumpListItemTask.IconIndex property.

The following tutorial describes these steps in more detail.

  1. First, create the resource file with icons that will be used in the Class Library. If you already have one, go to Step 4.

  2. Create new icons or import existing icons to the created Native Resource Template file.

  3. Save the created Native Resource Template file as a .res file.

  4. Create a new Class Library in your solution and enter a name for your project. In this sample, it is called MyIconLibrary.

  5. Then, in the project properties editor, specify the path to the created earlier resource file.

  6. Add the reference to MyIconLibrary to your project.

  7. Rebuild the solution.

  8. Set the TaskbarAssistant.IconsAssembly property to MyIconLibrary.dll.

  9. Now you can use icons from the MyIconLibrary.dll and specify task icons with the JumpListItemTask.IconIndex property.

See Also

IconPath

IconIndex

TaskbarAssistant Class

TaskbarAssistant Members

DevExpress.Utils.Taskbar Namespace