Use this reference for polished surface treatment and depth decisions.
Primary APIs:
Color, SolidColorBrush, gradient brushesBorder.Background, Border.BorderBrush, Border.BorderThicknessBorder.CornerRadius, Border.BoxShadowBoxShadowsExperimentalAcrylicBorder, ExperimentalAcrylicMaterialUse semantic roles:
Card example:
<Border xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Classes="metric-card"
Padding="16">
<StackPanel Spacing="8">
<TextBlock Classes="eyebrow" Text="Revenue" />
<TextBlock Classes="title" Text="$420,000" />
</StackPanel>
</Border>
<Style Selector="Border.metric-card">
<Setter Property="Background" Value="{DynamicResource Brush.Surface.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border.Subtle}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="12" />
<Setter Property="BoxShadow" Value="0 8 24 0 #18000000" />
</Style>
Use acrylic sparingly and only where a translucent surface adds context.
<ExperimentalAcrylicBorder xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
CornerRadius="12">
<ExperimentalAcrylicBorder.Material>
<ExperimentalAcrylicMaterial TintColor="#FF20242B"
TintOpacity="0.8"
MaterialOpacity="0.45"
FallbackColor="#CC20242B" />
</ExperimentalAcrylicBorder.Material>
<Border Padding="16">
<TextBlock Text="Use acrylic for accent surfaces, not every surface." />
</Border>
</ExperimentalAcrylicBorder>
Do:
Do not: