This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

NavigationTreeItem Pennington.Navigation

A node in the hierarchical navigation tree.

Properties

Children ImmutableList<NavigationTreeItem>
Child nodes nested under this one.
IsExpanded bool
True when the node should render expanded (contains or is the current route).
IsSelected bool
True when the node matches the current route.
Order int
Sort order within its parent.
Route ContentRoute
Route the node links to.
SectionLabel string
Optional section grouping label.
Title string
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

Title string
Display title for the node.
Route ContentRoute
Route the node links to.
Order int
Sort order within its parent.
SectionLabel string
Optional section grouping label.
IsSelected bool
True when the node matches the current route.
IsExpanded bool
True when the node should render expanded (contains or is the current route).
Children ImmutableList<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; }
}