Use this reference to build Fluent-aligned controls and interaction surfaces.
Primary APIs:
ControlTheme, StyledElement.ThemeButton, TextBox, ToggleSwitch, ListBox, TabControl, AutoCompleteBoxItemsControl.ItemContainerThemeMenuFlyout, MenuItem, Flyout.FlyoutPresenterTheme<ControlTheme xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Key="FluentPrimaryButtonTheme"
TargetType="Button"
BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Padding" Value="14,10" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Background" Value="{DynamicResource Brush.Brand.Primary}" />
<Setter Property="Foreground" Value="White" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Brand.Primary}" />
<Style Selector="^:pointerover">
<Setter Property="Background" Value="{DynamicResource Brush.Brand.Secondary}" />
</Style>
</ControlTheme>
<ListBox xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ItemContainerTheme="{StaticResource FluentNavItemTheme}" />
Use:
SplitView plus themed list items for Fluent side navigation,TabControl for workspace switching,MenuFlyout for lightweight overflow actions.<Button xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Theme="{StaticResource FluentPrimaryButtonTheme}"
Content="Deploy">
<Button.ContextFlyout>
<MenuFlyout FlyoutPresenterTheme="{StaticResource FluentFlyoutPresenterTheme}">
<MenuItem Header="Deploy now" />
<MenuItem Header="Schedule rollout" />
</MenuFlyout>
</Button.ContextFlyout>
</Button>
ControlTheme resources over repeated local styles.Do:
Do not: