Skip to content

TitleActionBuilder

Namespace: Hex1b

Assembly: Hex1b.dll

Builder for creating title bar actions in the fluent window API.

csharp
public sealed class TitleActionBuilder

Inheritance

ObjectTitleActionBuilder

Methods

Action(string, Action<WindowActionContext>)

Creates a custom action with the specified icon and handler.

Parameters:

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()
]);

Released under the MIT License.