WindowContentContext<TParentWidget>
Namespace: Hex1b
Assembly: Hex1b.dll
A widget context for building window content that provides access to the window being built.
csharp
public sealed class WindowContentContext<TParentWidget> : WidgetContext<TParentWidget> where TParentWidget : Hex1bWidgetInheritance
Object → WidgetContext<<TParentWidget>> → WindowContentContext<TParentWidget>
Properties
Window
The window handle for the window being built. Use this to close the window or perform other window operations from within the content.
Returns: WindowHandle
csharp
public WindowHandle Window { get; }Remarks
WindowContentContext extends with access to the property, which allows content to reference the window it belongs to. This is particularly useful for closing the window from within its content.
Example usage:
csharp
e.Windows.Window(w => w.VStack(v => [
v.Text("Hello!"),
v.Button("Close").OnClick(ev => ev.Windows.Close(w.Window))
]));