merge: integration branch claude/keen-knuth-uhxv8w (Archive manager and UI kit review) into the Library workstream

The Archive manager's reviewed dialogs (live status lines, one-sentence
errors, growing label columns, left-to-right paths) move into the shared
ArchiveDialogs.xaml with their styles, so the Library's Delete and the
Trash dialog use them too. Delete, Restore and Rate failures read as one
sentence through ArchiveFailures, which now knows a stale delete plan, a
newer sidecar and a sequence already back in the library
(SequenceInLibraryException). The confirmation's plan lines in the UI font
follow the reading direction; fingerprints stay left to right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-06 20:36:02 +00:00
commit 9f7907d903
77 files changed
+1966 -468

No files matched your search

+111 -41
View File
@@ -25,6 +25,17 @@
</Setter>
</Style>
<!-- Focus inside the bounds, for list rows and table rows whose neighbours or scroll viewport would hide an outer ring. -->
<Style x:Key="Focus.Inset">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="{DynamicResource Brush.Accent}" BorderThickness="2" CornerRadius="{StaticResource Radius.Control}" 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" />
@@ -212,24 +223,26 @@
<Setter Property="SelectionOpacity" Value="0.35" />
<Setter Property="Template">
<Setter.Value>
<!-- The text box hands its Padding to the content host itself, so the template applies it nowhere else: the
placeholder takes it as its own padding (plus the 2 px the text view adds) and the leading icon sits at its
left edge; with an icon, text and placeholder start 8 px after it. -->
<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}"
<Grid>
<ui:Icon x:Name="Glyph" Glyph="{TemplateBinding ui:Field.Glyph}" Foreground="{DynamicResource Brush.TextFaint}" HorizontalAlignment="Left"
Margin="{TemplateBinding Padding}" />
<TextBlock x:Name="Placeholder" Text="{TemplateBinding ui:Field.Placeholder}" Foreground="{DynamicResource Brush.TextFaint}" Padding="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" IsHitTestVisible="False" TextTrimming="CharacterEllipsis" Margin="24,0,0,0" />
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="22,0,0,0"
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="ui:Field.Glyph" Value="{x:Null}">
<Setter TargetName="Glyph" Property="Visibility" Value="Collapsed" />
<Setter TargetName="Placeholder" Property="Margin" Value="2,0,0,0" />
<Setter TargetName="PART_ContentHost" Property="Margin" Value="0" />
</Trigger>
<Trigger Property="Text" Value="">
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
@@ -256,8 +269,14 @@
</Setter>
</Style>
<!-- Naming templates ({year}/{date}_{n:0000}) and paths keep their characters in order in right-to-left languages. -->
<Style x:Key="TextBox.Mono" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="FontFamily" Value="{StaticResource Font.Mono}" />
<Setter Property="FlowDirection" Value="LeftToRight" />
</Style>
<Style x:Key="TextBox.Path" TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="FlowDirection" Value="LeftToRight" />
</Style>
<Style TargetType="PasswordBox" BasedOn="{StaticResource Input.Base}">
@@ -265,10 +284,11 @@
<Setter Property="SelectionBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Template">
<Setter.Value>
<!-- As for TextBox, the password box hands its Padding to the content host itself. -->
<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"
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" Focusable="False"
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
</Border>
<ControlTemplate.Triggers>
@@ -278,6 +298,11 @@
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
</Trigger>
<!-- A password has no binding to validate: the owner sets ui:Field.Error (DESIGN §4 error state, as TextBox). -->
<Trigger Property="ui:Field.HasError" Value="True">
<Setter TargetName="Bd" Property="BorderBrush" Value="{DynamicResource Brush.Error}" />
<Setter Property="AutomationProperties.HelpText" Value="{Binding (ui:Field.Error), RelativeSource={RelativeSource Self}}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4" />
</Trigger>
@@ -295,7 +320,7 @@
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="Transparent">
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Size="14" HorizontalAlignment="Right" Margin="0,0,10,0"
<ui:Icon Glyph="{StaticResource Icon.ChevronDown}" Size="14" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"
Foreground="{DynamicResource Brush.TextMuted}" />
</Border>
</ControlTemplate>
@@ -737,7 +762,7 @@
</Style>
<Style TargetType="ListBoxItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Inset}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="MinHeight" Value="36" />
<Setter Property="Padding" Value="10,0" />
@@ -800,7 +825,7 @@
</Style>
<Style TargetType="ListViewItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource Focus.Inset}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="Height" Value="{StaticResource Height.Row}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
@@ -1050,11 +1075,11 @@
<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}" />
Command="{x:Static SystemCommands.MinimizeWindowCommand}" AutomationProperties.Name="{l:Loc Tooltips.Window.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}" />
Command="{x:Static SystemCommands.MaximizeWindowCommand}" AutomationProperties.Name="{l:Loc Tooltips.Window.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}" />
Command="{x:Static SystemCommands.CloseWindowCommand}" AutomationProperties.Name="{l:Loc Tooltips.Window.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}"
@@ -1072,6 +1097,7 @@
<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}" />
<Setter TargetName="PART_Maximize" Property="AutomationProperties.Name" Value="{l:Loc Tooltips.Window.Restore}" />
</Trigger>
<Trigger Property="IsMaximizeHovered" Value="True">
<Setter TargetName="PART_Maximize" Property="Background" Value="{DynamicResource Brush.Card}" />
@@ -1106,7 +1132,7 @@
<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 x:Name="Row" Margin="10,0,8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
@@ -1116,8 +1142,9 @@
<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="{Binding Badge, RelativeSource={RelativeSource TemplatedParent}}" FontSize="10" FontWeight="SemiBold" Foreground="{DynamicResource Brush.OnAccent}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<Border x:Name="Badge" Grid.Column="2" MinWidth="18" Height="16" CornerRadius="8" Padding="5,0" Margin="6,0,0,0" Background="{DynamicResource Brush.Accent}" VerticalAlignment="Center">
<TextBlock Text="{Binding Badge, RelativeSource={RelativeSource TemplatedParent}}" FontSize="{StaticResource Size.Chip}" FontWeight="SemiBold" Foreground="{DynamicResource Brush.OnAccent}"
HorizontalAlignment="Center" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
</Border>
</Grid>
</Grid>
@@ -1126,12 +1153,15 @@
<Trigger Property="Badge" Value="0">
<Setter TargetName="Badge" Property="Visibility" Value="Collapsed" />
</Trigger>
<!-- 32 px button: the 16 px icon centred; the badge hangs off the icon's top-right corner (the negative margin
keeps it from widening the icon column) and covers only that corner. -->
<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="Row" Property="Margin" Value="8,0" />
<Setter TargetName="Badge" Property="Grid.Column" Value="0" />
<Setter TargetName="Badge" Property="HorizontalAlignment" Value="Left" />
<Setter TargetName="Badge" Property="VerticalAlignment" Value="Top" />
<Setter TargetName="Badge" Property="Margin" Value="8,2,-24,0" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="{DynamicResource Brush.Card}" />
@@ -1149,6 +1179,21 @@
</Style>
<!-- ===================== AutoSlider (advisor Auto / manual) ===================== -->
<!-- "Auto · 8" pill (DESIGN §4 Auto/manual): accent outline, 24 px, 11 px text; its tooltip gives the advisor's reason. -->
<Style x:Key="Button.AutoPill" TargetType="Button" BasedOn="{StaticResource Button.Base}">
<Setter Property="Height" Value="24" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Padding" Value="8,0" />
<Setter Property="FontSize" Value="{StaticResource Size.Chip}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Accent}" />
<Setter Property="ui:ControlState.CornerRadius" Value="12" />
<Setter Property="ui:ControlState.HoverBackground" Value="{DynamicResource Brush.AccentSubtle}" />
<Setter Property="ui:ControlState.HoverBorderBrush" Value="{DynamicResource Brush.Accent}" />
<Setter Property="ui:ControlState.PressedBackground" Value="{DynamicResource Brush.AccentSubtle}" />
</Style>
<Style x:Key="Pill.Auto" TargetType="Border">
<Setter Property="Height" Value="22" />
<Setter Property="Padding" Value="8,0" />
@@ -1172,32 +1217,40 @@
<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>
<Button x:Name="AutoPill" Grid.Column="1" Style="{StaticResource Button.AutoPill}" Content="{TemplateBinding AutoText}" ToolTip="{TemplateBinding AutoReason}"
AutomationProperties.Name="{Binding AutoText, RelativeSource={RelativeSource TemplatedParent}}"
AutomationProperties.HelpText="{Binding AutoReason, RelativeSource={RelativeSource TemplatedParent}}" />
<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}" />
Command="{x:Static ui:AutoSlider.ResetCommand}" ToolTip="{l:Loc Tooltips.Common.ResetToAuto}" AutomationProperties.Name="{l:Loc 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>
<!-- The slider carries the setting's name; its status says Auto (with the advisor's reason) or not applicable. -->
<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}" />
IsSnapToTickEnabled="{TemplateBinding IsSnapToTickEnabled}" ToolTip="{TemplateBinding SliderToolTip}"
AutomationProperties.Name="{Binding Header, RelativeSource={RelativeSource TemplatedParent}}"
AutomationProperties.ItemStatus="{Binding AutoText, RelativeSource={RelativeSource TemplatedParent}}"
AutomationProperties.HelpText="{Binding AutoReason, RelativeSource={RelativeSource TemplatedParent}}" />
</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}" />
<Setter TargetName="PART_Slider" Property="AutomationProperties.ItemStatus" Value="" />
<Setter TargetName="PART_Slider" Property="AutomationProperties.HelpText" Value="" />
</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" />
<Setter TargetName="PART_Slider" Property="AutomationProperties.ItemStatus" Value="{l:Loc Common.NotApplicable}" />
<Setter TargetName="PART_Slider" Property="AutomationProperties.HelpText" Value="{Binding NotApplicableReason, RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -1221,7 +1274,7 @@
<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}" />
ToolTip="{TemplateBinding RemoveToolTip}" AutomationProperties.Name="{l:Loc Common.Remove}" />
</StackPanel>
</Border>
<ControlTemplate.Triggers>
@@ -1314,19 +1367,19 @@
<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"
<!-- The text takes what it needs and trims only once the bar is down to 120 px: the spacer reserves those
120 px before the text is measured, and the bar reaches back over it. -->
<DockPanel>
<Button x:Name="Stop" DockPanel.Dock="Right" Style="{StaticResource Button.Icon}" Width="28" Height="28" MinWidth="28"
ui:ButtonIcon.Glyph="{TemplateBinding ActionGlyph}" Command="{TemplateBinding StopCommand}" ToolTip="{TemplateBinding StopToolTip}"
AutomationProperties.Name="{Binding StopToolTip, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
AutomationProperties.Name="{Binding StopName, RelativeSource={RelativeSource TemplatedParent}}"
AutomationProperties.HelpText="{Binding StopToolTip, RelativeSource={RelativeSource TemplatedParent}}" />
<FrameworkElement DockPanel.Dock="Left" Width="120" />
<TextBlock DockPanel.Dock="Right" Text="{TemplateBinding Text}" Margin="12,0,12,0" VerticalAlignment="Center" FontSize="{StaticResource Size.Body}"
Typography.NumeralAlignment="Tabular" TextTrimming="CharacterEllipsis" />
<ProgressBar x:Name="Bar" Margin="-120,0,0,0" VerticalAlignment="Center" Maximum="1" Value="{TemplateBinding Progress}" IsIndeterminate="{TemplateBinding IsIndeterminate}"
AutomationProperties.Name="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsActive" Value="False">
@@ -1364,6 +1417,22 @@
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="0,0,20,44" />
<Setter Property="Focusable" Value="False" />
<!-- The host keys its own style, so no theme template applies: without this one nothing would draw. -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ui:ToastHost">
<ItemsPresenter />
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="ContentPresenter">
<Setter Property="AutomationProperties.Name" Value="{Binding Title}" />
<Setter Property="AutomationProperties.HelpText" Value="{Binding Message}" />
</Style>
</Setter.Value>
</Setter>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type ui:Toast}">
@@ -1384,7 +1453,8 @@
<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}" />
Command="{x:Static ui:ToastHost.DismissCommand}" CommandParameter="{Binding}" ToolTip="{l:Loc Tooltips.Common.DismissToast}"
AutomationProperties.Name="{l:Loc Tooltips.Common.Dismiss}" />
</Grid>
</Grid>
</Border>
+15 -8
View File
@@ -1,7 +1,8 @@
<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:v="clr-namespace:Titano.Ui.Visuals">
xmlns:v="clr-namespace:Titano.Ui.Visuals"
xmlns:l="clr-namespace:Titano.Ui.Localization">
<!--
Styles of the high-performance visuals (Titano.Ui.Visuals), merged by Controls.xaml. Brushes and the shared
button templates of Controls.xaml are DynamicResource (they live in the parent dictionary); sizes, radii and
@@ -76,14 +77,17 @@
CornerRadius="{StaticResource Radius.Card}">
<StackPanel>
<v:AspectRatioDecorator>
<Grid x:Name="PART_Thumbnail" Background="Transparent">
<!-- The photo and the scrub position are a left-to-right island (time runs left to right, as in the
filmstrip); the check box, badge and quick actions follow the layout direction. -->
<Grid Background="Transparent">
<Border CornerRadius="7,7,0,0" Background="{DynamicResource Brush.Preview}" />
<Border CornerRadius="7,7,0,0">
<Border x:Name="PART_Thumbnail" CornerRadius="7,7,0,0" FlowDirection="LeftToRight">
<Border.Background>
<ImageBrush ImageSource="{Binding DisplayedThumbnail, RelativeSource={RelativeSource TemplatedParent}}" Stretch="UniformToFill" />
</Border.Background>
</Border>
<Border x:Name="ScrubTrack" Height="2" VerticalAlignment="Bottom" Background="{DynamicResource Brush.Accent}" RenderTransformOrigin="0,0.5" Visibility="Collapsed">
<Border x:Name="ScrubTrack" Height="2" VerticalAlignment="Bottom" Background="{DynamicResource Brush.Accent}" RenderTransformOrigin="0,0.5" Visibility="Collapsed"
FlowDirection="LeftToRight">
<Border.RenderTransform>
<ScaleTransform ScaleX="{Binding ScrubPosition, RelativeSource={RelativeSource TemplatedParent}}" />
</Border.RenderTransform>
@@ -151,13 +155,14 @@
</Style>
<!-- ===================== Preview viewport (BRIEF §12.3) ===================== -->
<!-- The image surface (a drawn visual, always left to right) and the numeric shot data stay left to right; the tool
row follows the layout direction. -->
<Style TargetType="v:PreviewViewport">
<Setter Property="Background" Value="{DynamicResource Brush.Preview}" />
<Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Secondary}" />
<Setter Property="FlowDirection" Value="LeftToRight" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource Focus.Ring}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="v:PreviewViewport">
@@ -165,7 +170,7 @@
<Grid>
<v:PreviewSurface x:Name="PART_Surface" CornerRadius="8" />
<ContentPresenter x:Name="PART_Tools" Content="{TemplateBinding ToolsContent}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="12" />
<Grid x:Name="PART_Info" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="12" IsHitTestVisible="False">
<Grid x:Name="PART_Info" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="12" IsHitTestVisible="False" FlowDirection="LeftToRight">
<Border Background="{DynamicResource Brush.Chrome}" Opacity="0.85" CornerRadius="{StaticResource Radius.Control}" />
<TextBlock Text="{TemplateBinding InfoText}" Margin="10,6" Typography.NumeralAlignment="Tabular" TextTrimming="CharacterEllipsis" />
</Grid>
@@ -275,6 +280,7 @@
<Style TargetType="v:SplitButton">
<Setter Property="Height" Value="{StaticResource Height.Control}" />
<Setter Property="DropDownName" Value="{l:Loc Common.MoreChoices}" />
<Setter Property="FontFamily" Value="{StaticResource Font.Ui}" />
<Setter Property="FontSize" Value="{StaticResource Size.Body}" />
<Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
@@ -287,7 +293,8 @@
CommandTarget="{TemplateBinding CommandTarget}" />
<ToggleButton x:Name="Arrow" Style="{DynamicResource Button.Base}" Height="{TemplateBinding Height}" Width="28" MinWidth="28" Padding="0" Margin="-1,0,0,0"
ClickMode="Press" ui:ControlState.CornerRadius="0,6,6,0" ui:ButtonIcon.Glyph="{DynamicResource Icon.ChevronDown}"
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" ToolTip="{TemplateBinding DropDownToolTip}" />
IsChecked="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" ToolTip="{TemplateBinding DropDownToolTip}"
AutomationProperties.Name="{Binding DropDownName, RelativeSource={RelativeSource TemplatedParent}}" />
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsPrimary" Value="True">