Layout panels for Blazor
-
Add package reference (.NET CLI):
dotnet add package BlazorLayouts --version 1.0.0
-
In Blazor Server:
In
_Host.cshtml
,<head></head>
add:<link href="_content/BlazorLayouts/blazor-layouts.css" rel="stylesheet"/>
Minimal example:
<StackPanel>
<button>One</button>
<button>Two</button>
<button>Three</button>
<button>Four</button>
<button>Five</button>
</StackPanel>
Full example:
<StackPanel Orientation="Orientation.Vertical"
Justify="Justify.Normal"
Align="Align.Normal"
StretchChildren="StretchChildren.None"
IsVisible="true"
HidingMode="HidingMode.Collapse"
IsEnabled="true"
Margin="0"
Padding="10"
Spacing="10"
HorizontalScrollBar="ScrollBar.Auto"
VerticalScrollBar="ScrollBar.Auto"
Style="height: 300px"
Background="lightgray">
<button>One</button>
<button>Two</button>
<button>Three</button>
<button>Four</button>
<button>Five</button>
</StackPanel>