TitleActionBuilder
Namespace: Hex1b
Assembly: Hex1b.dll
Builder for creating title bar actions in the fluent window API.
csharp
public sealed class TitleActionBuilderInheritance
Object → TitleActionBuilder
Methods
Action(string, Action<WindowActionContext>)
Creates a custom action with the specified icon and handler.
Parameters:
icon(String): The icon to display (emoji or single character).handler(Action<WindowActionContext>): The action handler called when clicked.
Returns: TitleAction
A title action descriptor.
csharp
public TitleAction Action(string icon, Action<WindowActionContext> handler)Close(string)
Creates a standard close action that closes the window when clicked.
Parameters:
icon(String): Optional custom icon. Defaults to "×".
Returns: TitleAction
A title action descriptor for the close button.
csharp
public TitleAction Close(string icon = "×")Remarks
TitleActionBuilder is passed to the and builder functions, providing methods to create standard and custom title bar actions.
Example usage:
csharp
window.RightTitleActions(t => [
t.Action("?", ctx => ShowHelp()),
t.Close()
]);