From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As DockItem )

aDesktopApplication.DockItem = newDockItemValue
DockItemValue = aDesktopApplication.DockItem

New in 2021r3

Supported for all project types and targets.

Enables you to manipulate the dock item associated with the application (macOS only).


The DockItem property enables you to access the properties and methods of the DockItem class. This class has two methods, UpdateNow and ResetIcon, and one property, Graphics. Use the methods of the Graphics class to modify the appearance of the icon. Since a macOS icon is intended to be scaled automatically, you should design it as a 512x512 pixel icon.

  • ResetIcon resets the icon to its original state (default appearance).
  • Call the UpdateNow method to redraw the icon.

You can also use the ClearRect property of the Graphics class to start over from a blank icon. Anything you can do with a Graphics object you are able to do with the Dock's Graphics object (like drawing in a picture or using a Group2D). The DockItem property of the DesktopWindow class enables you to control the dock item for individual windows.