Documentation
On this page

Interface · Desktop Services

DesktopTrayIcon

Live native tray icon owned by a DesktopApplication.

@sharpts/gui · SharpTS 572a2e31be0e

Members

isDisposed

readonly isDisposed: boolean

Whether the native tray icon has been disposed.

Type: boolean

dispose

dispose(): void

Removes and disposes the native tray icon.

Remarks

Disposal is idempotent and releases all native menu callbacks.

Examples

TypeScript
tray.dispose();

update

update(options: TrayIconOptions): void

Replaces the icon image, tooltip, menu, and callbacks.

Remarks

Call dispose when the tray icon is no longer needed.

Throws

  • When the icon is disposed or the replacement icon or menu is invalid.

Examples

TypeScript
tray.update({ icon: "assets/ready.ico", toolTip: "Ready" });

Source

src/SharpTS.Gui.Sdk/GuiPackage/runtime.ts:1114 at SharpTS revision 572a2e31be0e2a09be0138bc44501b34d6245b51.