Skip to main content
A newer version of this page is available. .

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.v18.2.dll

Declaration

[DefaultValue("")]
[DXCategory("Appearance")]
public string IconsAssembly { get; set; }

Property Value

Type Default Description
String String.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.

    Click the TaskBarAssistant‘s smart tag and select the Add Icons to Project Resources command:

    tb-icons-01-smartTag

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

    tb-icons-01-5-resource-file-name

  3. Add icons to the resources.

    Right-click within the opened resource file and select Add Resource:

    tb-icons-02-AddResource

  4. Create or import an icon(s).

    You can create a new icon (by clicking New) or import an existing icon from disk (by clicking Import):

    tb-icons-03-AddResourceDialog-ImportButton

    If you choose the Import command, load an ICO file or files using the Open File dialog that will be invoked.

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

    tb-icons-04-SetIconsAssembly.png

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

    tb-icons-05-SetIconIndex.png

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.

    In Visual Studio, create a new Native Resource Template file.

    JumpList_IconAssembly_AddNewNativeResourceTemplate

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

    JumpList_IconAssembly_AddResource

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

    JumpList_IconAssembly_SaveResourceTemplateAs

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

    JumpList_IconAssembly_NewProject

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

    JumpList_IconAssembly_ResourceFile

  6. Add the reference to MyIconLibrary to your project.

    JumpList_IconAssembly_AddAReference

  7. Rebuild the solution.
  8. Set the TaskbarAssistant.IconsAssembly property to MyIconLibrary.dll.

    JumpList_IconAssembly_IconAssemblyProperty

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

    JumpList_IconAssembly_SelectIcon

See Also