development-plugin-for-avalonia

Fluent Alias Tokens, Brand Mapping, Materials, and Elevation

Table of Contents

  1. Scope and Primary APIs
  2. Semantic Mapping
  3. Elevation and Materials
  4. AOT and Runtime Notes
  5. Do and Don’t Guidance
  6. Troubleshooting
  7. Official Resources

Scope and Primary APIs

Use this reference to map Fluent palette resources into product-level semantics.

Primary APIs:

High-value material members:

Semantic Mapping

<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <SolidColorBrush x:Key="Brush.Brand.Primary" Color="{DynamicResource SystemAccentColor}" />
  <SolidColorBrush x:Key="Brush.Brand.Secondary" Color="{DynamicResource SystemAccentColorDark1}" />
  <SolidColorBrush x:Key="Brush.Text.Primary" Color="{DynamicResource SystemBaseHighColor}" />
  <SolidColorBrush x:Key="Brush.Text.Secondary" Color="{DynamicResource SystemBaseMediumColor}" />
  <SolidColorBrush x:Key="Brush.Surface.Window" Color="{DynamicResource SystemRegionColor}" />
  <SolidColorBrush x:Key="Brush.Surface.Card" Color="{DynamicResource SystemChromeLowColor}" />
  <SolidColorBrush x:Key="Brush.Border.Subtle" Color="{DynamicResource SystemChromeMediumLowColor}" />
</ResourceDictionary>

Guidance:

Elevation and Materials

<Border xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Background="{DynamicResource Brush.Surface.Card}"
        BorderBrush="{DynamicResource Brush.Border.Subtle}"
        BorderThickness="1"
        CornerRadius="12"
        BoxShadow="0 8 24 0 #18000000" />
<ExperimentalAcrylicBorder xmlns="https://github.com/avaloniaui"
                           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                           CornerRadius="12">
  <ExperimentalAcrylicBorder.Material>
    <ExperimentalAcrylicMaterial TintColor="{DynamicResource SystemChromeLowColor}"
                                 TintOpacity="0.8"
                                 MaterialOpacity="0.45"
                                 FallbackColor="#CC1F1F21" />
  </ExperimentalAcrylicBorder.Material>
</ExperimentalAcrylicBorder>

Guidance:

AOT and Runtime Notes

Do and Don’t Guidance

Do:

Do not:

Troubleshooting

  1. Brand mapping feels too loud.
    • Reduce the number of accent-derived surfaces and let neutrals carry more of the UI.
  2. Acrylic surfaces hurt readability.
    • Increase fallback strength and isolate text from the translucent background.
  3. Dark theme elevation feels muddy.
    • Reduce shadow and increase border contrast instead.

Official Resources