Skip to content

NotificationPanelNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

Render node for . Displays floating notifications and a drawer panel.

csharp
public sealed class NotificationPanelNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → NotificationPanelNode

Properties ​

CardNodes ​

Notification card nodes for floating view. Managed by NotificationPanelWidget reconciliation.

Returns: List<NotificationCardNode>

csharp
public List<NotificationCardNode> CardNodes { get; }

Content ​

The main content node.

Returns: Hex1bNode

csharp
public Hex1bNode? Content { get; set; }

DrawerBackdrop ​

Backdrop node used to capture clicks outside the drawer when expanded.

Returns: BackdropNode

csharp
public BackdropNode? DrawerBackdrop { get; set; }

DrawerCardNodes ​

Notification card nodes for drawer view. Managed by NotificationPanelWidget reconciliation.

Returns: List<NotificationCardNode>

csharp
public List<NotificationCardNode> DrawerCardNodes { get; }

DrawerFloats ​

Whether the drawer floats on top of content or docks beside it.

Returns: Boolean

csharp
public bool DrawerFloats { get; set; }

DrawerScroll ​

Scroll node for the drawer content when there are many notifications.

Returns: ScrollPanelNode

csharp
public ScrollPanelNode? DrawerScroll { get; set; }

DrawerVStack ​

VStack node to hold drawer cards inside the scroll.

Returns: VStackNode

csharp
public VStackNode? DrawerVStack { get; set; }

IsDrawerExpanded ​

Whether the notification drawer is expanded. Syncs with NotificationStack.IsPanelVisible.

Returns: Boolean

csharp
public bool IsDrawerExpanded { get; set; }

MaxFloating ​

Maximum number of floating notifications to display.

Returns: Int32

csharp
public int MaxFloating { get; set; }

Notifications ​

Gets the notification stack from the nearest INotificationHost in the parent chain. Caches the result for performance.

Returns: NotificationStack

csharp
public NotificationStack Notifications { get; }

OffsetX ​

Horizontal offset from the right edge for floating notifications.

Returns: Int32

csharp
public int OffsetX { get; set; }

OffsetY ​

Vertical offset from the top edge for floating notifications.

Returns: Int32

csharp
public int OffsetY { 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() ​

Gets the direct children of this node for structural tree traversal. Container nodes should override this to return their children.

Returns: IEnumerable<Hex1bNode>

csharp
public override IEnumerable<Hex1bNode> GetChildren()

GetFocusableNodes() ​

Gets all focusable nodes in this subtree (including this node if focusable).

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)

Remarks ​

NotificationPanelNode finds the nearest (typically a ZStackNode) in its parent chain and uses that host's . This allows the NotificationPanel to be placed anywhere in the widget tree while still accessing the app-wide notification system.

Renders floating notifications as cards in the top-right corner of the panel. Notifications stack vertically, newest on top. When the drawer is expanded, shows all notifications (including timed-out) in a sidebar.

Released under the MIT License.