Use this reference for adaptive shells, density control, and high-quality loading or error states.
Primary APIs:
Grid, UniformGrid, SplitView, ScrollViewerContainerQuery, Container.SetName(...), Container.SetSizing(...), ContainerSizingClassesProgressBar, TransitioningContentControl, RefreshContainer<Grid xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="Root"
Container.Name="ShellHost"
Container.Sizing="Width">
<Grid.Styles>
<ContainerQuery Name="ShellHost" Query="max-width:720">
<Style Selector="UniformGrid#CardGrid">
<Setter Property="Columns" Value="1" />
</Style>
</ContainerQuery>
<ContainerQuery Name="ShellHost" Query="min-width:721 and max-width:1100">
<Style Selector="UniformGrid#CardGrid">
<Setter Property="Columns" Value="2" />
</Style>
</ContainerQuery>
<ContainerQuery Name="ShellHost" Query="min-width:1101">
<Style Selector="UniformGrid#CardGrid">
<Setter Property="Columns" Value="3" />
</Style>
</ContainerQuery>
</Grid.Styles>
<UniformGrid x:Name="CardGrid" Columns="3" />
</Grid>
<StackPanel xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Spacing="12">
<ProgressBar IsIndeterminate="True"
IsVisible="{CompiledBinding IsLoading}" />
<TextBlock Text="No incidents found"
IsVisible="{CompiledBinding IsEmpty}" />
<Border Classes.error="{CompiledBinding HasError}"
IsVisible="{CompiledBinding HasError}"
Padding="12">
<TextBlock Text="{CompiledBinding ErrorMessage}" />
</Border>
</StackPanel>
Guidance:
Do:
Do not:
Container.Name and Container.Sizing are set on the intended host.