Skip to content

NotificationCardNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

Render node for . Displays a notification with title, optional body, action buttons, and timeout progress bar. Composes child ButtonNode for dismiss and SplitButtonNode for actions.

csharp
public sealed class NotificationCardNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → NotificationCardNode

Properties ​

ActionButton ​

The action button child node.

Returns: SplitButtonNode

csharp
public SplitButtonNode? ActionButton { get; set; }

Body ​

The notification body text (optional).

Returns: String

csharp
public string? Body { get; set; }

DismissButton ​

The dismiss button child node.

Returns: ButtonNode

csharp
public ButtonNode? DismissButton { get; set; }

IsFocusable ​

Returns true if this node can receive focus.

Returns: Boolean

csharp
public override bool IsFocusable { get; }

IsFocused ​

Gets or sets whether this node is currently focused. Only meaningful for focusable nodes (where IsFocusable is true).

Returns: Boolean

csharp
public override bool IsFocused { get; set; }

IsHovered ​

Gets or sets whether the mouse is currently hovering over this node. Set by Hex1bApp based on mouse position during each frame. Only set on focusable nodes (tracked via FocusRing hit testing).

Returns: Boolean

csharp
public override bool IsHovered { get; set; }

ManagesChildFocus ​

Returns true if this node manages focus for its children. When a parent manages focus, child containers should NOT set initial focus themselves. Container nodes like SplitterNode should override this to return true.

Returns: Boolean

csharp
public override bool ManagesChildFocus { get; }

Notification ​

The notification this card displays.

Returns: Notification

csharp
public Notification? Notification { get; set; }

PrimaryAction ​

The primary action.

Returns: NotificationAction

csharp
public NotificationAction? PrimaryAction { get; set; }

SecondaryActions ​

The secondary actions.

Returns: IReadOnlyList<NotificationAction>

csharp
public IReadOnlyList<NotificationAction> SecondaryActions { get; set; }

ShowProgressBar ​

Whether to show the timeout progress bar. When false, the progress bar is hidden (e.g., in the drawer view).

Returns: Boolean

csharp
public bool ShowProgressBar { get; set; }

Stack ​

The notification stack for dismiss operations.

Returns: NotificationStack

csharp
public NotificationStack? Stack { get; set; }

Title ​

The notification title.

Returns: String

csharp
public string Title { get; set; }

Methods ​

ArrangeCore(Rect) ​

Override this method to implement arranging logic for this node. The base implementation saves previous bounds, marks dirty on change, and sets bounds.

Parameters:

csharp
protected override void ArrangeCore(Rect bounds)

ConfigureDefaultBindings(InputBindingsBuilder) ​

Configures the default input bindings for this node type. Override in derived classes to add default key bindings. These bindings can be inspected and modified by the user's callback.

Parameters:

csharp
public override void ConfigureDefaultBindings(InputBindingsBuilder bindings)

GetChildren() ​

Returns all children for rendering.

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetChildren()

GetFocusableNodes() ​

Returns focusable children (dismiss button and action button).

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetFocusableNodes()

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

Released under the MIT License.