NavigationTreeItem Pennington.Navigation
A node in the hierarchical navigation tree.
Properties
ChildrenSystem.Collections.Immutable.ImmutableList<Pennington.Navigation.NavigationTreeItem>- Child nodes nested under this one.
IsExpandedbool- Default:
falseTrue when the node should render expanded (contains or is the current route). IsSelectedbool- Default:
falseTrue when the node matches the current route. Orderint- Default:
0Sort order within its parent. RoutePennington.Routing.ContentRoute- Route the node links to.
SectionLabelstring?- Default:
nullOptional section grouping label. Titlestring- Display title for the node.
Constructors
.ctor
#public record NavigationTreeItem(
string Title,
ContentRoute Route,
int Order,
string? SectionLabel,
bool IsSelected,
bool IsExpanded,
ImmutableList<NavigationTreeItem> Children
);A node in the hierarchical navigation tree.
Parameters
Titlestring- Display title for the node.
RouteContentRoute- Route the node links to.
Orderint- Sort order within its parent.
SectionLabelstring?- Optional section grouping label.
IsSelectedbool- True when the node matches the current route.
IsExpandedbool- True when the node should render expanded (contains or is the current route).
ChildrenImmutableList<NavigationTreeItem>- Child nodes nested under this one.
Pennington.Navigation.NavigationTreeItem
namespace Pennington.Navigation;
/// A node in the hierarchical navigation tree.
public record NavigationTreeItem
{
/// A node in the hierarchical navigation tree.
public record NavigationTreeItem(
string Title,
ContentRoute Route,
int Order,
string? SectionLabel,
bool IsSelected,
bool IsExpanded,
ImmutableList<NavigationTreeItem> Children
);
/// Child nodes nested under this one.
ImmutableList<NavigationTreeItem> Children
;
/// True when the node should render expanded (contains or is the current route).
bool IsExpanded
;
/// True when the node matches the current route.
bool IsSelected
;
/// Sort order within its parent.
int Order
;
/// Route the node links to.
ContentRoute Route
;
/// Optional section grouping label.
string? SectionLabel
;
/// Display title for the node.
string Title
;
}