Interface · Application Lifecycle
DesktopWindow
Live desktop window created by DesktopApplication.
@sharpts/gui · SharpTS 572a2e31be0eMembers
closed
readonly closed: Promise<void>Promise completed after the native window closes.
Type: Promise<void>
isDisposed
readonly isDisposed: booleanWhether the native window and reactive root have been disposed.
Type: boolean
activate
activate(): voidActivates the window and requests foreground focus.
Remarks
Operating-system focus-stealing policies can prevent the window from receiving foreground focus.
Examples
window.activate();close
close(): voidRequests that the native window close.
Remarks
Await closed when work must continue only after native close processing finishes.
Examples
window.close();
await window.closed;dispose
dispose(): voidDisposes the native window and its reactive tree.
Remarks
Disposal is idempotent and completes the closed promise.
Examples
window.dispose();findResource
findResource(key: string): DesktopResourceValue | nullLooks up a resource through the window and application dictionaries.
Remarks
Window resources take precedence over application resources.
Examples
const accent = window.findResource("AccentColor");Related symbols
Source
src/SharpTS.Gui.Sdk/GuiPackage/runtime.ts:1051 at SharpTS revision 572a2e31be0e2a09be0138bc44501b34d6245b51.