PickerNode
Namespace: Hex1b
Assembly: Hex1b.dll
Render node for PickerWidget. Manages the picker's selection state and popup display.
public sealed class PickerNode : Hex1bNodeInheritance
Object → Hex1bNode → PickerNode
Properties
ContentChild
The reconciled content child node. This is the root of the widget tree built by the picker widget.
Returns: Hex1bNode
public Hex1bNode? ContentChild { get; set; }IsFocusable
Picker nodes are NOT themselves focusable - focus passes through to children.
Returns: Boolean
public override bool IsFocusable { get; }IsFocused
Focus state exists on the content child, not the picker node itself.
Returns: Boolean
public override bool IsFocused { get; set; }Items
The list of items available for selection.
Returns: IReadOnlyList<String>
public IReadOnlyList<string> Items { get; set; }SelectedIndex
The index of the currently selected item. This value is owned by the node and preserved across reconciliation.
Returns: Int32
public int SelectedIndex { get; set; }SelectedText
Gets the text of the currently selected item, or empty string if no items.
Returns: String
public string SelectedText { get; }SelectionChangedAction
Callback invoked when selection changes.
Returns: Func<InputBindingActionContext, Task>
public Func<InputBindingActionContext, Task>? SelectionChangedAction { 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:
rect(Rect):
protected override void ArrangeCore(Rect rect)GetChildren()
Gets the direct children of this node. Used for input routing and tree traversal. Container nodes should override this to return their children.
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetChildren()GetFocusableNodes()
Gets all focusable nodes in this subtree (including this node if focusable).
Returns: IEnumerable<Hex1bNode>
public override IEnumerable<Hex1bNode> GetFocusableNodes()MeasureCore(Constraints)
Override this method to implement measuring logic for this node.
Parameters:
constraints(Constraints):
Returns: Size
protected override Size MeasureCore(Constraints constraints)Render(Hex1bRenderContext)
Renders the node to the given context.
Parameters:
context(Hex1bRenderContext):
public override void Render(Hex1bRenderContext context)SelectItemAsync(int, InputBindingActionContext)
Selects an item by index and dismisses the popup.
Parameters:
index(Int32):context(InputBindingActionContext):
Returns: Task
public Task SelectItemAsync(int index, InputBindingActionContext context)