Class TwSidebarNavigationList
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
Recursively renders a list of NavigationItems for TwSidebar, expanding any item with nested NavigationItems into its own collapsible group - to any depth.
public class TwSidebarNavigationList : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
- Inheritance
-
TwSidebarNavigationList
- Implements
- Inherited Members
Remarks
An internal building block of TwSidebar, not intended to be used directly by consumers.
Constructors
TwSidebarNavigationList()
public TwSidebarNavigationList()
Properties
Depth
Gets or sets how many levels deep Items sit (0 for the sidebar's top-level items, 1 for a parent's children, 2 for grandchildren, and so on).
[Parameter]
public int Depth { get; set; }
Property Value
Remarks
Passed straight through to each rendered Depth, and incremented by one on every recursive call rendering a parent item's own children.
IsNested
Gets or sets whether this list is itself the children of a parent item (as opposed to the sidebar's top-level items).
[Parameter]
public bool IsNested { get; set; }
Property Value
Remarks
Changes how each item is wrapped (in an <li>, to be valid inside the parent's
<ul>) and rounded (grouped with its siblings rather than independently rounded). Always
true for a recursive call rendering a parent item's own children, regardless of depth.
Items
Gets or sets the navigation items to render at this level.
[Parameter]
[EditorRequired]
public List<NavigationItem> Items { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder