Interface · Desktop Services
DesktopTrayIcon
Live native tray icon owned by a DesktopApplication.
@sharpts/gui · SharpTS 572a2e31be0eMembers
isDisposed
readonly isDisposed: booleanWhether the native tray icon has been disposed.
Type: boolean
dispose
dispose(): voidRemoves and disposes the native tray icon.
Remarks
Disposal is idempotent and releases all native menu callbacks.
Examples
TypeScript
tray.dispose();update
update(options: TrayIconOptions): voidReplaces 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" });Related symbols
Source
src/SharpTS.Gui.Sdk/GuiPackage/runtime.ts:1114 at SharpTS revision 572a2e31be0e2a09be0138bc44501b34d6245b51.