NavigationTreeItem
Pennington.Navigation
A node in the hierarchical navigation tree.
Properties
ChildrenImmutableList<NavigationTreeItem>- Child nodes nested under this one.
IsExpandedbool- True when the node should render expanded (contains or is the current route).
IsSelectedbool- True when the node matches the current route.
Orderint- Sort order within its parent.
RouteContentRoute- Route the node links to.
SectionLabelstring- Optional section grouping label.
Titlestring- Display title for the node.
Constructors
NavigationTreeItem
#public 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
{
/// Child nodes nested under this one.
public ImmutableList<NavigationTreeItem> Children { get; set; }
/// True when the node should render expanded (contains or is the current route).
public bool IsExpanded { get; set; }
/// True when the node matches the current route.
public bool IsSelected { get; set; }
/// A node in the hierarchical navigation tree.
public NavigationTreeItem(string Title, ContentRoute Route, int Order, string SectionLabel, bool IsSelected, bool IsExpanded, ImmutableList<NavigationTreeItem> Children)
;
/// Sort order within its parent.
public int Order { get; set; }
/// Route the node links to.
public ContentRoute Route { get; set; }
/// Optional section grouping label.
public string SectionLabel { get; set; }
/// Display title for the node.
public string Title { get; set; }
}