Files
Chronos/src/Titano.Ui/Themes/Controls.xaml
T
Claude 04e3e3bdda feat(ui-visuals): add Visuals.xaml styles and merge them into the theme
Card list and container styles, SequenceCard, PreviewViewport,
SegmentedControl and SplitButton templates, focus visuals for the drawn
controls; Controls.xaml merges the dictionary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 10:27:10 +00:00

1393 lines
76 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:Titano.Ui.Controls"
xmlns:l="clr-namespace:Titano.Ui.Localization">
<!--
Titano control styles (DESIGN.md §4). Brushes are DynamicResource so the token dictionary can be swapped
at run time; sizes, radii and fonts are StaticResource from Typography.xaml.
-->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Titano.Ui;component/Themes/Typography.xaml" />
<ResourceDictionary Source="pack://application:,,,/Titano.Ui;component/Icons/Icons.xaml" />
<ResourceDictionary Source="pack://application:,,,/Titano.Ui;component/Themes/Visuals.xaml" />
</ResourceDictionary.MergedDictionaries>
<BooleanToVisibilityConverter x:Key="BoolToVisibility" />
<!-- Focus: 2 px accent ring outside the control. -->
<Style x:Key="Focus.Ring">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Border Margin="-3" BorderBrush="{DynamicResource Brush.Accent}" BorderThickness="2" CornerRadius="8" SnapsToDevicePixels="True" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DropShadowEffect x:Key="Shadow.Popup" BlurRadius="24" ShadowDepth="6" Direction="270" Opacity="0.45" Color="Black" />
<DropShadowEffect x:Key="Shadow.ToolTip" BlurRadius="14" ShadowDepth="4" Direction="270" Opacity="0.4" Color="Black" />
<!-- ===================== Buttons ===================== -->
<ControlTemplate x:Key="Template.Button" TargetType="ButtonBase">
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding ui:ControlState.CornerRadius}"
SnapsToDevicePixels="True">
<StackPanel Orientation="Horizontal" Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<ui:Icon x:Name="Glyph" Glyph="{TemplateBinding ui:ButtonIcon.Glyph}" Margin="0,0,8,0" VerticalAlignment="Center" />
<ContentPresenter x:Name="Content" VerticalAlignment="Center" RecognizesAccessKey="True" />
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="ui:ButtonIcon.Glyph" Value="{x:Null}">
<Setter TargetName="Glyph" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="Content" Value="{x:Null}">
<Setter TargetName="Glyph" Property="Margin" Value="0" />
<Setter TargetName="Content" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{Binding (ui:ControlState.HoverBackground), RelativeSource={RelativeSource TemplatedParent}}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{Binding (ui:ControlState.HoverBorderBrush), RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{Binding (ui:ControlState.PressedBackground), RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="Button.Base" TargetType="ButtonBase">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="12,0" />
<Setter Property="Height" Value="{StaticResource Height.Control}" />
<Setter Property="MinWidth" Value="44" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.CardHover}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.StrokeStrong}" />
<Setter Property="ui:ControlState.PressedBackground" Value="{DynamicResource Brush.CardPressed}" />
<Setter Property="Template" Value="{StaticResource Template.Button}" />
</Style>
<Style TargetType="Button" BasedOn="{StaticResource Button.Base}" />
<Style TargetType="RepeatButton" BasedOn="{StaticResource Button.Base}" />
<Style x:Key="Button.Primary" TargetType="Button" BasedOn="{StaticResource Button.Base}">
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.OnAccent}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.AccentHover}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.AccentHover}" />
<Setter Property="ui:ControlState.PressedBackground" Value="{DynamicResource Brush.AccentPressed}" />
</Style>
<Style x:Key="Button.Destructive" TargetType="Button" BasedOn="{StaticResource Button.Base}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Warning}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Warning}" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.WarningSubtle}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.Warning}" />
<Setter Property="ui:ControlState.PressedBackground" Value="{DynamicResource Brush.WarningSubtle}" />
</Style>
<Style x:Key="Button.Subtle" TargetType="ButtonBase" BasedOn="{StaticResource Button.Base}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.Card}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="Transparent" />
<Setter Property="ui:ControlState.PressedBackground" Value="{DynamicResource Brush.CardPressed}" />
</Style>
<Style x:Key="Button.Icon" TargetType="Button" BasedOn="{StaticResource Button.Base}">
<Setter Property="Width" Value="32" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="Padding" Value="0" />
</Style>
<Style x:Key="Button.IconSubtle" TargetType="Button" BasedOn="{StaticResource Button.Subtle}">
<Setter Property="Width" Value="32" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
</Style>
<Style x:Key="Button.Compact" TargetType="Button" BasedOn="{StaticResource Button.Base}">
<Setter Property="Height" Value="{StaticResource Height.Compact}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
</Style>
<Style x:Key="Button.Link" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
<Setter Property="Padding" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<TextBlock x:Name="Text" Background="Transparent">
<ContentPresenter RecognizesAccessKey="True" />
</TextBlock>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Text" Property="TextDecorations" Value="Underline" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Toggled = accent text + accent border. -->
<Style TargetType="ToggleButton" BasedOn="{StaticResource Button.Base}">
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Background" Value="{DynamicResource Brush.AccentSubtle}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.AccentSubtle}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ToggleButton.Icon" TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Width" Value="32" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="Padding" Value="0" />
</Style>
<!-- Segmented group member: square corners inside, set CornerRadius on the ends. -->
<Style x:Key="RadioButton.Segment" TargetType="RadioButton" BasedOn="{StaticResource Button.Base}">
<Setter Property="Width" Value="32" />
<Setter Property="MinWidth" Value="32" />
<Setter Property="Padding" Value="0" />
<Setter Property="ui:ControlState.CornerRadius" Value="0" />
<Setter Property="Margin" Value="0,0,-1,0" />
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Background" Value="{DynamicResource Brush.AccentSubtle}" />
<Setter Property="Panel.ZIndex" Value="1" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.AccentSubtle}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- ===================== Text inputs ===================== -->
<Style x:Key="Input.Base" TargetType="Control">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Height" Value="{StaticResource Height.Control}" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}" />
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource Input.Base}">
<Setter Property="CaretBrush" Value="{DynamicResource Brush.Text}" />
<Setter Property="SelectionBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="SelectionOpacity" Value="0.35" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True">
<Grid Margin="{TemplateBinding Padding}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:Icon x:Name="Glyph" Glyph="{TemplateBinding ui:Field.Glyph}" Foreground="{DynamicResource Brush.TextFaint}" Margin="0,0,8,0" VerticalAlignment="Center" />
<TextBlock x:Name="Placeholder" Grid.Column="1" Text="{TemplateBinding ui:Field.Placeholder}" Foreground="{DynamicResource Brush.TextFaint}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" IsHitTestVisible="False" TextTrimming="CharacterEllipsis" Margin="2,0,0,0" />
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" Focusable="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="ui:Field.Glyph" Value="{x:Null}">
<Setter TargetName="Glyph" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="Text" Value="">
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.StrokeStrong}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="Validation.HasError" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Error}" />
<Setter Property="ToolTip" Value="{Binding (Validation.Errors)[0].ErrorContent, RelativeSource={RelativeSource Self}}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
<Trigger Property="IsReadOnly" Value="True">
<Setter TargetName="Bd" Property="Background" Value="Transparent" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TextBox.Mono" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="FontFamily" Value="{StaticResource Font.Mono}" />
</Style>
<Style TargetType="PasswordBox" BasedOn="{StaticResource Input.Base}">
<Setter Property="CaretBrush" Value="{DynamicResource Brush.Text}" />
<Setter Property="SelectionBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="PasswordBox">
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" Focusable="False"
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.StrokeStrong}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== ComboBox ===================== -->
<Style x:Key="ComboBox.Toggle" TargetType="ToggleButton">
<Setter Property="Focusable" Value="False" />
<Setter Property="ClickMode" Value="Press" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Size="14" HorizontalAlignment="Right" Margin="0,0,10,0"
Foreground="{DynamicResource Brush.TextMuted}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBox" BasedOn="{StaticResource Input.Base}">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
<Setter Property="MaxDropDownHeight" Value="360" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True" />
<ContentPresenter x:Name="ContentSite" Margin="10,0,30,0" VerticalAlignment="Center" IsHitTestVisible="False"
Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" />
<TextBox x:Name="PART_EditableTextBox" Visibility="Collapsed" Margin="0,0,24,0" Background="Transparent" BorderThickness="0"
IsReadOnly="{TemplateBinding IsReadOnly}" />
<ToggleButton Style="{StaticResource ComboBox.Toggle}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
<Popup x:Name="PART_Popup" Placement="Bottom" VerticalOffset="4" AllowsTransparency="True" Focusable="False"
IsOpen="{TemplateBinding IsDropDownOpen}" PopupAnimation="Fade">
<Border Margin="8,0,8,16" MinWidth="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}}"
MaxHeight="{TemplateBinding MaxDropDownHeight}" Background="{DynamicResource Brush.Surface}"
BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="1" CornerRadius="{StaticResource Radius.Card}"
Effect="{StaticResource Shadow.Popup}" Padding="4">
<ScrollViewer SnapsToDevicePixels="True">
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEditable" Value="True">
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
<Setter TargetName="ContentSite" Property="Visibility" Value="Hidden" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.CardHover}" />
</Trigger>
<Trigger Property="IsDropDownOpen" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ComboBoxItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBoxItem">
<Border x:Name="Bd" Background="Transparent" CornerRadius="{StaticResource Radius.Control}" Padding="{TemplateBinding Padding}">
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.CardHover}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.AccentSubtle}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== CheckBox / RadioButton ===================== -->
<Style TargetType="CheckBox">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid Background="Transparent" MinHeight="24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="Box" Width="18" Height="18" CornerRadius="4" BorderThickness="1" VerticalAlignment="Center"
Background="{DynamicResource Brush.Card}" BorderBrush="{DynamicResource Brush.StrokeStrong}">
<ui:Icon x:Name="Mark" Glyph="{StaticResource Icon.Check}" Size="14" StrokeWidth="2.2" Foreground="{DynamicResource Brush.OnAccent}" Visibility="Collapsed" />
</Border>
<ContentPresenter x:Name="Content" Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Content" Value="{x:Null}">
<Setter TargetName="Content" Property="Margin" Value="0" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Box" Property="BorderBrush" Value="{DynamicResource Brush.TextMuted}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Box" Property="Background" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Box" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Mark" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter TargetName="Box" Property="Background" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Box" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Mark" Property="Glyph" Value="{StaticResource Icon.Minus}" />
<Setter TargetName="Mark" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Switch: 40×20 track with a sliding knob. -->
<Style x:Key="CheckBox.Switch" TargetType="CheckBox">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="Track" Width="40" Height="20" CornerRadius="10" BorderThickness="1"
Background="Transparent" BorderBrush="{DynamicResource Brush.TextMuted}">
<Ellipse x:Name="Knob" Width="12" Height="12" HorizontalAlignment="Left" Margin="4,0,0,0" Fill="{DynamicResource Brush.TextMuted}" />
</Border>
<ContentPresenter Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Track" Property="Background" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Track" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Knob" Property="HorizontalAlignment" Value="Right" />
<Setter TargetName="Knob" Property="Margin" Value="0,0,4,0" />
<Setter TargetName="Knob" Property="Fill" Value="{DynamicResource Brush.OnAccent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="RadioButton">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="Transparent" MinHeight="24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Ellipse x:Name="Outer" Width="18" Height="18" StrokeThickness="1" Fill="{DynamicResource Brush.Card}" Stroke="{DynamicResource Brush.StrokeStrong}" />
<Ellipse x:Name="Dot" Width="7" Height="7" Fill="{DynamicResource Brush.OnAccent}" Visibility="Collapsed" />
<ContentPresenter Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Outer" Property="Stroke" Value="{DynamicResource Brush.TextMuted}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Outer" Property="Fill" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Outer" Property="Stroke" Value="{DynamicResource Brush.Accent}" />
<Setter TargetName="Dot" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Slider ===================== -->
<Style x:Key="Slider.TrackButton" TargetType="RepeatButton">
<Setter Property="Focusable" Value="False" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border Background="Transparent">
<Border Height="4" CornerRadius="2" Background="{TemplateBinding Background}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Slider.Thumb" TargetType="Thumb">
<Setter Property="Focusable" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Grid Width="20" Height="20" Background="Transparent">
<Ellipse x:Name="Outer" Fill="{DynamicResource Brush.Chrome}" Stroke="{DynamicResource Brush.Stroke}" StrokeThickness="1" />
<Ellipse x:Name="Inner" Margin="4" Fill="{Binding (ui:ControlState.Accent), RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Inner" Property="Margin" Value="3" />
</Trigger>
<Trigger Property="IsDragging" Value="True">
<Setter TargetName="Inner" Property="Margin" Value="5" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Slider">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="ui:ControlState.Accent" Value="{DynamicResource Brush.Accent}" />
<Setter Property="MinHeight" Value="24" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid Background="Transparent">
<Track x:Name="PART_Track" VerticalAlignment="Center">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource Slider.TrackButton}" Command="{x:Static Slider.DecreaseLarge}"
Background="{Binding (ui:ControlState.Accent), RelativeSource={RelativeSource TemplatedParent}}" />
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource Slider.TrackButton}" Command="{x:Static Slider.IncreaseLarge}" Background="{DynamicResource Brush.Track}" />
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource Slider.Thumb}" />
</Track.Thumb>
</Track>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== ProgressBar ===================== -->
<Style TargetType="ProgressBar">
<Setter Property="Height" Value="6" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Background" Value="{DynamicResource Brush.Track}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<Border x:Name="PART_Track" Background="{TemplateBinding Background}" CornerRadius="3" ClipToBounds="True">
<Grid>
<Border x:Name="PART_Indicator" HorizontalAlignment="Left" Background="{TemplateBinding Foreground}" CornerRadius="3" />
<Rectangle x:Name="Sweep" Visibility="Collapsed">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<LinearGradientBrush.RelativeTransform>
<TranslateTransform x:Name="SweepShift" X="-1" />
</LinearGradientBrush.RelativeTransform>
<GradientStop Color="Transparent" Offset="0.3" />
<GradientStop Color="{DynamicResource Color.Accent}" Offset="0.5" />
<GradientStop Color="Transparent" Offset="0.7" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsIndeterminate" Value="True">
<Setter TargetName="PART_Indicator" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Sweep" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="SweepAnimation">
<Storyboard RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="SweepShift" Storyboard.TargetProperty="X" From="-0.7" To="0.7" Duration="0:0:1.6" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<StopStoryboard BeginStoryboardName="SweepAnimation" />
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== ToolTip: light on dark, one line, ≤ 2 sentences ===================== -->
<Style TargetType="ToolTip">
<Setter Property="Foreground" Value="{DynamicResource Brush.OnToolTip}" />
<Setter Property="Background" Value="{DynamicResource Brush.ToolTip}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
<Setter Property="HasDropShadow" Value="True" />
<Setter Property="Placement" Value="Bottom" />
<Setter Property="VerticalOffset" Value="6" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToolTip">
<Border Margin="10,4,10,14" Padding="10,6" MaxWidth="320" CornerRadius="{StaticResource Radius.Control}"
Background="{TemplateBinding Background}" Effect="{StaticResource Shadow.ToolTip}">
<ContentPresenter>
<ContentPresenter.Resources>
<Style TargetType="TextBlock">
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="LineHeight" Value="16" />
</Style>
</ContentPresenter.Resources>
</ContentPresenter>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== ScrollBar ===================== -->
<Style x:Key="ScrollBar.Page" TargetType="RepeatButton">
<Setter Property="Focusable" Value="False" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">
<Border Background="Transparent" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollBar.Thumb" TargetType="Thumb">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Thumb">
<Border x:Name="Bd" CornerRadius="3" Background="{DynamicResource Brush.StrokeStrong}" />
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.TextFaint}" />
</Trigger>
<Trigger Property="IsDragging" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.TextMuted}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ScrollBar">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Width" Value="10" />
<Setter Property="MinWidth" Value="10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Track x:Name="PART_Track" IsDirectionReversed="True" Margin="2">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBar.Page}" Command="{x:Static ScrollBar.PageUpCommand}" />
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBar.Page}" Command="{x:Static ScrollBar.PageDownCommand}" />
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBar.Thumb}" />
</Track.Thumb>
</Track>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Orientation" Value="Horizontal">
<Setter Property="Width" Value="Auto" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Height" Value="10" />
<Setter Property="MinHeight" Value="10" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Track x:Name="PART_Track" IsDirectionReversed="False" Margin="2">
<Track.DecreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBar.Page}" Command="{x:Static ScrollBar.PageLeftCommand}" />
</Track.DecreaseRepeatButton>
<Track.IncreaseRepeatButton>
<RepeatButton Style="{StaticResource ScrollBar.Page}" Command="{x:Static ScrollBar.PageRightCommand}" />
</Track.IncreaseRepeatButton>
<Track.Thumb>
<Thumb Style="{StaticResource ScrollBar.Thumb}" />
</Track.Thumb>
</Track>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!-- ===================== Lists and tables ===================== -->
<Style TargetType="ListBox">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True" />
<Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling" />
<Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel" />
</Style>
<Style TargetType="ListBoxItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="MinHeight" Value="36" />
<Setter Property="Padding" Value="10,0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border x:Name="Bd" Background="Transparent" BorderThickness="1" BorderBrush="Transparent" CornerRadius="{StaticResource Radius.Control}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.AccentSubtle}" />
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="GridViewColumnHeader">
<Setter Property="Foreground" Value="{DynamicResource Brush.TextFaint}" />
<Setter Property="FontSize" Value="11" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Grid>
<Border x:Name="Bd" Background="Transparent" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1" Padding="10,0" Height="32">
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Border>
<Thumb x:Name="PART_HeaderGripper" HorizontalAlignment="Right" Width="6" Margin="0,0,-3,0" Cursor="SizeWE">
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Border Background="Transparent" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListView" BasedOn="{StaticResource {x:Type ListBox}}">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
</Style>
<Style TargetType="ListViewItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Height" Value="{StaticResource Height.Row}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="Bd" Background="Transparent" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1">
<GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Columns="{TemplateBinding GridView.ColumnCollection}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.AccentSubtle}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Tabs: underline style ===================== -->
<Style TargetType="TabControl">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1">
<TabPanel x:Name="HeaderPanel" IsItemsHost="True" KeyboardNavigation.TabIndex="1" />
</Border>
<ContentPresenter Grid.Row="1" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Grid Background="Transparent" Height="36" Margin="0,0,2,0">
<ContentPresenter ContentSource="Header" Margin="14,0" VerticalAlignment="Center" HorizontalAlignment="Center" RecognizesAccessKey="True" />
<Border x:Name="Underline" Height="2" VerticalAlignment="Bottom" Background="{DynamicResource Brush.Accent}" Visibility="Hidden" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter TargetName="Underline" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Menus ===================== -->
<Style TargetType="ContextMenu">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="HasDropShadow" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContextMenu">
<Border Margin="8,0,8,16" Padding="4" MinWidth="180" Background="{DynamicResource Brush.Surface}" BorderBrush="{DynamicResource Brush.Stroke}"
BorderThickness="1" CornerRadius="{StaticResource Radius.Card}" Effect="{StaticResource Shadow.Popup}">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="MenuItem">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Height" Value="32" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="MenuItem">
<Grid>
<Border x:Name="Bd" Background="Transparent" CornerRadius="{StaticResource Radius.Control}" Padding="10,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="IconSite" ContentSource="Icon" VerticalAlignment="Center" />
<ui:Icon x:Name="Check" Glyph="{StaticResource Icon.Check}" Visibility="Collapsed" Foreground="{DynamicResource Brush.Accent}" />
<ContentPresenter Grid.Column="1" ContentSource="Header" VerticalAlignment="Center" RecognizesAccessKey="True" />
<TextBlock Grid.Column="2" Text="{TemplateBinding InputGestureText}" Margin="24,0,0,0" Foreground="{DynamicResource Brush.TextFaint}" VerticalAlignment="Center" />
<ui:Icon x:Name="Arrow" Grid.Column="3" Glyph="{StaticResource Icon.ChevronRight}" Size="14" Margin="8,0,0,0" Visibility="Collapsed" Foreground="{DynamicResource Brush.TextMuted}" />
</Grid>
</Border>
<Popup x:Name="PART_Popup" Placement="Right" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade">
<Border Margin="8,0,8,16" Padding="4" MinWidth="180" Background="{DynamicResource Brush.Surface}" BorderBrush="{DynamicResource Brush.Stroke}"
BorderThickness="1" CornerRadius="{StaticResource Radius.Card}" Effect="{StaticResource Shadow.Popup}">
<StackPanel IsItemsHost="True" />
</Border>
</Popup>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.CardHover}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Check" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="Role" Value="SubmenuHeader">
<Setter TargetName="Arrow" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Separator">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Separator">
<Border Height="1" Margin="4" Background="{DynamicResource Brush.Stroke}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Separator.Vertical" TargetType="Separator">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Separator">
<Border Width="1" Margin="8,6" Background="{DynamicResource Brush.Stroke}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Surfaces ===================== -->
<Style x:Key="Border.Panel" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource Brush.Surface}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{StaticResource Radius.Card}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style x:Key="Border.Card" TargetType="Border">
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="{StaticResource Radius.Card}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style x:Key="Border.Toolbar" TargetType="Border">
<Setter Property="MinHeight" Value="{StaticResource Height.Toolbar}" />
<Setter Property="Padding" Value="20,12" />
</Style>
<!-- ===================== Window chrome ===================== -->
<Style x:Key="Caption.Button" TargetType="Button">
<Setter Property="Width" Value="46" />
<Setter Property="Height" Value="34" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="Transparent">
<ui:Icon Glyph="{TemplateBinding ui:ButtonIcon.Glyph}" Size="14" StrokeWidth="1.2" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="Caption.Close" TargetType="Button" BasedOn="{StaticResource Caption.Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Bd" Background="Transparent">
<ui:Icon Glyph="{TemplateBinding ui:ButtonIcon.Glyph}" Size="14" StrokeWidth="1.2" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.CaptionCloseHover}" />
<Setter Property="Foreground" Value="White" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ui:IconData x:Key="Icon.Caption.Minimize" Stroke="M3 8 H13" />
<ui:IconData x:Key="Icon.Caption.Maximize" Stroke="M3.5 3.5 H12.5 V12.5 H3.5 Z" />
<ui:IconData x:Key="Icon.Caption.Restore" Stroke="M3.5 5.5 H10.5 V12.5 H3.5 Z M5.5 5.5 V3.5 H12.5 V10.5 H10.5" />
<ui:IconData x:Key="Icon.Caption.Close" Stroke="M3.5 3.5 L12.5 12.5 M12.5 3.5 L3.5 12.5" />
<Style TargetType="ui:TitanoWindow">
<Setter Property="Background" Value="{DynamicResource Brush.Bg}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:TitanoWindow">
<Border x:Name="Root" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="34" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border Background="{DynamicResource Brush.Chrome}" />
<DockPanel LastChildFill="True">
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
<Button x:Name="Minimize" Style="{StaticResource Caption.Button}" ui:ButtonIcon.Glyph="{StaticResource Icon.Caption.Minimize}"
Command="{x:Static SystemCommands.MinimizeWindowCommand}" AutomationProperties.Name="Minimize" ToolTip="{l:Loc Tooltips.Window.Minimize}" />
<Button x:Name="PART_Maximize" Style="{StaticResource Caption.Button}" ui:ButtonIcon.Glyph="{StaticResource Icon.Caption.Maximize}"
Command="{x:Static SystemCommands.MaximizeWindowCommand}" AutomationProperties.Name="Maximize" ToolTip="{l:Loc Tooltips.Window.Maximize}" />
<Button x:Name="Close" Style="{StaticResource Caption.Close}" ui:ButtonIcon.Glyph="{StaticResource Icon.Caption.Close}"
Command="{x:Static SystemCommands.CloseWindowCommand}" AutomationProperties.Name="Close" ToolTip="{l:Loc Tooltips.Window.Close}" />
</StackPanel>
<ui:BrandMarkIcon Width="16" Height="16" Margin="12,0,10,0" VerticalAlignment="Center" />
<TextBlock Text="{TemplateBinding Title}" Foreground="{DynamicResource Brush.TextMuted}" FontSize="{StaticResource Size.Secondary}"
VerticalAlignment="Center" TextTrimming="CharacterEllipsis" Margin="0,0,16,0" DockPanel.Dock="Left" />
<ContentPresenter Content="{TemplateBinding TitleBarContent}" VerticalAlignment="Center" WindowChrome.IsHitTestVisibleInChrome="True" />
</DockPanel>
<AdornerDecorator Grid.Row="1">
<ContentPresenter />
</AdornerDecorator>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="WindowState" Value="Maximized">
<Setter TargetName="Root" Property="BorderThickness" Value="0" />
<Setter TargetName="Root" Property="Padding" Value="{x:Static SystemParameters.WindowResizeBorderThickness}" />
<Setter TargetName="PART_Maximize" Property="ui:ButtonIcon.Glyph" Value="{StaticResource Icon.Caption.Restore}" />
<Setter TargetName="PART_Maximize" Property="ToolTip" Value="{l:Loc Tooltips.Window.Restore}" />
</Trigger>
<Trigger Property="IsMaximizeHovered" Value="True">
<Setter TargetName="PART_Maximize" Property="Background" Value="{DynamicResource Brush.Card}" />
</Trigger>
<Trigger Property="IsDialog" Value="True">
<Setter TargetName="Minimize" Property="Visibility" Value="Collapsed" />
<Setter TargetName="PART_Maximize" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="ResizeMode" Value="NoResize">
<Setter TargetName="PART_Maximize" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="ResizeMode" Value="CanMinimize">
<Setter TargetName="PART_Maximize" Property="Visibility" Value="Collapsed" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Navigation rail ===================== -->
<Style TargetType="ui:NavRailButton">
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Ring}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="Height" Value="36" />
<Setter Property="Margin" Value="0,0,0,2" />
<Setter Property="ToolTipService.Placement" Value="Right" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:NavRailButton">
<Border x:Name="Bd" Background="Transparent" CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True">
<Grid>
<Border x:Name="Edge" Width="3" HorizontalAlignment="Left" CornerRadius="1.5" Margin="0,8" Background="{DynamicResource Brush.Accent}" Visibility="Hidden" />
<Grid Margin="10,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:Icon Glyph="{TemplateBinding Glyph}" VerticalAlignment="Center" />
<TextBlock x:Name="Label" Grid.Column="1" Margin="10,0,0,0" VerticalAlignment="Center" TextTrimming="CharacterEllipsis">
<ContentPresenter RecognizesAccessKey="True" />
</TextBlock>
<Border x:Name="Badge" Grid.Column="2" MinWidth="18" Height="16" CornerRadius="8" Padding="5,0" Background="{DynamicResource Brush.Accent}" VerticalAlignment="Center">
<TextBlock Text="{TemplateBinding Badge}" FontSize="10" FontWeight="SemiBold" Foreground="{DynamicResource Brush.OnAccent}" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
</Grid>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Badge" Value="0">
<Setter TargetName="Badge" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="ui:NavRail.IsCollapsed" Value="True">
<Setter TargetName="Label" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Badge" Property="HorizontalAlignment" Value="Right" />
<Setter TargetName="Badge" Property="VerticalAlignment" Value="Top" />
<Setter TargetName="Badge" Property="Margin" Value="-14,4,0,0" />
<Setter TargetName="Badge" Property="Grid.Column" Value="0" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter TargetName="Edge" Property="Visibility" Value="Visible" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== AutoSlider (advisor Auto / manual) ===================== -->
<Style x:Key="Pill.Auto" TargetType="Border">
<Setter Property="Height" Value="22" />
<Setter Property="Padding" Value="8,0" />
<Setter Property="CornerRadius" Value="11" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style TargetType="ui:AutoSlider">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Margin" Value="0,0,0,12" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:AutoSlider">
<StackPanel>
<Grid MinHeight="24">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{TemplateBinding Header}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
<Border x:Name="AutoPill" Grid.Column="1" Style="{StaticResource Pill.Auto}" ToolTip="{TemplateBinding AutoReason}" ToolTipService.ShowOnDisabled="True">
<TextBlock Text="{TemplateBinding AutoText}" FontSize="{StaticResource Size.Chip}" Foreground="{DynamicResource Brush.Accent}" VerticalAlignment="Center" />
</Border>
<StackPanel x:Name="Manual" Grid.Column="1" Orientation="Horizontal" Visibility="Collapsed">
<TextBlock Text="{TemplateBinding DisplayValue}" VerticalAlignment="Center" Style="{StaticResource Text.Number}" />
<Button Style="{StaticResource Button.IconSubtle}" Width="26" Height="26" Margin="6,0,0,0" ui:ButtonIcon.Glyph="{StaticResource Icon.Reset}"
Command="{x:Static ui:AutoSlider.ResetCommand}" ToolTip="{l:Loc Tooltips.Common.ResetToAuto}" />
</StackPanel>
<TextBlock x:Name="NotApplicable" Grid.Column="1" Text="{l:Loc Common.NotApplicable}" Foreground="{DynamicResource Brush.TextFaint}"
ToolTip="{TemplateBinding NotApplicableReason}" Visibility="Collapsed" VerticalAlignment="Center" />
</Grid>
<Slider x:Name="PART_Slider" Margin="0,6,0,0" Minimum="{TemplateBinding Minimum}" Maximum="{TemplateBinding Maximum}"
SmallChange="{TemplateBinding SmallChange}" LargeChange="{TemplateBinding SmallChange}" TickFrequency="{TemplateBinding TickFrequency}"
IsSnapToTickEnabled="{TemplateBinding IsSnapToTickEnabled}" ToolTip="{TemplateBinding SliderToolTip}" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsAuto" Value="False">
<Setter TargetName="AutoPill" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Manual" Property="Visibility" Value="Visible" />
<Setter TargetName="PART_Slider" Property="ui:ControlState.Accent" Value="{DynamicResource Brush.Sun}" />
</Trigger>
<Trigger Property="IsApplicable" Value="False">
<Setter TargetName="AutoPill" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Manual" Property="Visibility" Value="Collapsed" />
<Setter TargetName="NotApplicable" Property="Visibility" Value="Visible" />
<Setter TargetName="PART_Slider" Property="IsEnabled" Value="False" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Chips, status glyphs ===================== -->
<Style TargetType="ui:Chip">
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Background" Value="{DynamicResource Brush.Card}" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Stroke}" />
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
<Setter Property="Height" Value="24" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:Chip">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="{StaticResource Radius.Pill}" Padding="10,0,6,0">
<StackPanel Orientation="Horizontal">
<ContentPresenter VerticalAlignment="Center" Margin="0,0,4,0" />
<Button x:Name="Remove" Style="{StaticResource Button.IconSubtle}" Width="18" Height="18" MinWidth="18" ui:ControlState.CornerRadius="9"
ui:ButtonIcon.Glyph="{StaticResource Icon.Close}" Command="{TemplateBinding RemoveCommand}" CommandParameter="{TemplateBinding RemoveCommandParameter}"
ToolTip="{TemplateBinding RemoveToolTip}" />
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="RemoveCommand" Value="{x:Null}">
<Setter TargetName="Remove" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<Trigger Property="IsRecommended" Value="True">
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ui:StatusGlyph">
<Setter Property="FontSize" Value="{StaticResource Size.Chip}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:StatusGlyph">
<StackPanel Orientation="Horizontal" Background="Transparent">
<ui:Icon x:Name="Glyph" Glyph="{StaticResource Icon.Dot}" Size="11" Margin="0,0,4,0" VerticalAlignment="Center" />
<TextBlock Text="{TemplateBinding Text}" VerticalAlignment="Center" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="Kind" Value="Analysed"><Setter Property="Foreground" Value="{DynamicResource Brush.Success}" /></Trigger>
<Trigger Property="Kind" Value="Done"><Setter Property="Foreground" Value="{DynamicResource Brush.Success}" /></Trigger>
<Trigger Property="Kind" Value="Online"><Setter Property="Foreground" Value="{DynamicResource Brush.Success}" /></Trigger>
<Trigger Property="Kind" Value="NotAnalysed">
<Setter Property="Foreground" Value="{DynamicResource Brush.TextFaint}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Ring}" />
</Trigger>
<Trigger Property="Kind" Value="NoProxies">
<Setter Property="Foreground" Value="{DynamicResource Brush.TextFaint}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Ring}" />
</Trigger>
<Trigger Property="Kind" Value="Offline">
<Setter Property="Foreground" Value="{DynamicResource Brush.TextFaint}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Ring}" />
</Trigger>
<Trigger Property="Kind" Value="Queued">
<Setter Property="Foreground" Value="{DynamicResource Brush.TextFaint}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Ring}" />
</Trigger>
<Trigger Property="Kind" Value="Rendered">
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.TriangleRight}" />
</Trigger>
<Trigger Property="Kind" Value="Synced"><Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" /></Trigger>
<Trigger Property="Kind" Value="Remote"><Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" /></Trigger>
<Trigger Property="Kind" Value="Running"><Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" /></Trigger>
<Trigger Property="Kind" Value="Analysing">
<Setter Property="Foreground" Value="{DynamicResource Brush.Warning}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.HalfDot}" />
</Trigger>
<Trigger Property="Kind" Value="Paused">
<Setter Property="Foreground" Value="{DynamicResource Brush.Warning}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Pause}" />
</Trigger>
<Trigger Property="Kind" Value="Warning">
<Setter Property="Foreground" Value="{DynamicResource Brush.Warning}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Triangle}" />
</Trigger>
<Trigger Property="Kind" Value="Error">
<Setter Property="Foreground" Value="{DynamicResource Brush.Error}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Cross}" />
</Trigger>
<Trigger Property="Kind" Value="Failed">
<Setter Property="Foreground" Value="{DynamicResource Brush.Error}" />
<Setter TargetName="Glyph" Property="Glyph" Value="{StaticResource Icon.Cross}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Job bar ===================== -->
<Style TargetType="ui:JobBar">
<Setter Property="Height" Value="{StaticResource Height.JobBar}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.TextMuted}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:JobBar">
<Border Background="{DynamicResource Brush.Surface}" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,0,0,1" Padding="20,0,12,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="120" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ProgressBar x:Name="Bar" VerticalAlignment="Center" Maximum="1" Value="{TemplateBinding Progress}" IsIndeterminate="{TemplateBinding IsIndeterminate}" />
<TextBlock Grid.Column="1" Text="{TemplateBinding Text}" Margin="12,0,12,0" VerticalAlignment="Center" FontSize="{StaticResource Size.Body}"
Typography.NumeralAlignment="Tabular" TextTrimming="CharacterEllipsis" MaxWidth="640" />
<Button x:Name="Stop" Grid.Column="2" Style="{StaticResource Button.Icon}" Width="28" Height="28" MinWidth="28"
ui:ButtonIcon.Glyph="{StaticResource Icon.Stop}" Command="{TemplateBinding StopCommand}" ToolTip="{TemplateBinding StopToolTip}" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsActive" Value="False">
<Setter TargetName="Stop" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Bar" Property="Value" Value="0" />
<Setter TargetName="Bar" Property="IsIndeterminate" Value="False" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Empty state ===================== -->
<Style TargetType="ui:EmptyState">
<Setter Property="Focusable" Value="False" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:EmptyState">
<StackPanel HorizontalAlignment="Center">
<ui:BrandMarkIcon Width="48" Height="48" HorizontalAlignment="Center" />
<TextBlock Text="{TemplateBinding Message}" Style="{StaticResource Text.Title}" FontWeight="Normal" HorizontalAlignment="Center" Margin="0,16,0,16" TextTrimming="None" TextWrapping="Wrap" TextAlignment="Center" MaxWidth="420" />
<ContentPresenter HorizontalAlignment="Center" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ===================== Toasts ===================== -->
<Style TargetType="ui:ToastHost">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="0,0,20,44" />
<Setter Property="Focusable" Value="False" />
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type ui:Toast}">
<Border Width="420" Margin="0,8,0,0" Background="{DynamicResource Brush.Card}" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="1"
CornerRadius="{StaticResource Radius.Card}" Effect="{StaticResource Shadow.Popup}" ClipToBounds="False">
<Grid>
<Border Width="3" HorizontalAlignment="Left" CornerRadius="8,0,0,8" Background="{DynamicResource Brush.Accent}" />
<Grid Margin="16,12,12,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel VerticalAlignment="Center">
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis" />
<TextBlock Text="{Binding Message}" Style="{StaticResource Text.Secondary}" TextTrimming="CharacterEllipsis" Margin="0,2,0,0" />
</StackPanel>
<Button Grid.Column="1" Style="{StaticResource Button.Primary}" Margin="12,0,0,0" Content="{Binding ActionText}" Command="{Binding ActionCommand}"
ToolTip="{Binding ActionToolTip}" Visibility="{Binding ActionCommand, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
<Button Grid.Column="2" Style="{StaticResource Button.IconSubtle}" Margin="4,0,0,0" ui:ButtonIcon.Glyph="{StaticResource Icon.Close}"
Command="{x:Static ui:ToastHost.DismissCommand}" CommandParameter="{Binding}" ToolTip="{l:Loc Tooltips.Common.Dismiss}" />
</Grid>
</Grid>
</Border>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>