This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

NavigationTreeItem Pennington.Navigation

A node in the hierarchical navigation tree.

Properties

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

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
{
    /// 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
; }