Files
Chronos/src/Chronos.App/Sections/SequenceView.xaml
T
Alby96andClaude Opus 5.5 0c51d11080 feat(workspace): copy originals into the workspace and choose the project Edit opens
Phase 5c P1. A workspace copy of kind "originals" now copies each frame's
original beside its proxy, so a later local render has full-quality input:
streamed into a .part file, hashed as written, checked against the home's
SHA-256, renamed and read back. Archive and server homes both work, a stopped
copy resumes (originals: checkpoint), and the space check counts the
originals. A frame whose original is gone, damaged or refused keeps its proxy
and the job says how many; the copy does not fail. Stale originals are
deleted only when the home holds the same SHA-256, otherwise moved to the
workspace's trash.

Proxies only... plans first (every original hashed against the home's
frames), asks for an explicit confirmation, rewrites the media to proxies
before it touches a file, refuses a plan that changed since, and trashes what
the home no longer holds instead of deleting it.

Edit: Open in workspace offers Originals (the settings' default, disabled
when the drive lacks room) with the originals' size for archive and server
homes; Settings > Workspace > Open project picks Last used, Main or asks
which; each open is recorded for the clean-up. The project menu gains Copy
originals... and Proxies only..., refused while changes are unsaved or jobs
of the sequence run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:43:42 +01:00

334 lines
26 KiB
XML

<UserControl x:Class="Chronos.App.Sections.SequenceView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:Chronos.Ui.Controls;assembly=Chronos.Ui"
xmlns:v="clr-namespace:Chronos.Ui.Visuals;assembly=Chronos.Ui"
xmlns:l="clr-namespace:Chronos.Ui.Localization;assembly=Chronos.Ui"
xmlns:infra="clr-namespace:Chronos.App.Infrastructure"
xmlns:sections="clr-namespace:Chronos.App.Sections"
KeyDown="OnKeyDown" Loaded="OnLoaded">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Chronos;component/Editor/EditorStyles.xaml" />
<ResourceDictionary Source="pack://application:,,,/Chronos;component/Workspace/WorkspaceDialogs.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<UserControl.InputBindings>
<!-- Owner review 1, R7: the picker over the open sequence. -->
<KeyBinding Key="O" Modifiers="Control" Command="{Binding ChangeSequenceCommand}" />
</UserControl.InputBindings>
<Grid>
<ProgressBar Width="240" IsIndeterminate="True" VerticalAlignment="Center" Visibility="{Binding IsLoading, Converter={StaticResource BoolToVisibility}}"
AutomationProperties.Name="{l:Loc Editor.Loading}" />
<!--
The open sequence stays laid out behind the picker (hidden, not collapsed: collapsing it would shrink the preview
and render it again when it comes back), and while a switch is under way (the progress bar shows).
-->
<!-- Behind an open dialog the editor takes neither clicks nor the keyboard. -->
<Grid x:Name="EditorHost" IsEnabled="{Binding IsContentEnabled}">
<Grid.Style>
<Style TargetType="Grid">
<Style.Triggers>
<DataTrigger Binding="{Binding IsPicking}" Value="True">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
<DataTrigger Binding="{Binding IsLoading}" Value="True">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<!-- Editor.html: header, the step bar, then the preview, filmstrip and the step's measure on the left and its column on the right. -->
<Grid x:Name="EditorRoot" DataContext="{Binding Editor}" Margin="16,0,16,12" IsVisibleChanged="OnEditorVisibleChanged"
PreviewKeyDown="OnEditorPreviewKeyDown" Visibility="{Binding Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
<Grid.InputBindings>
<KeyBinding Key="Z" Modifiers="Control" Command="{Binding UndoCommand}" />
<KeyBinding Key="Y" Modifiers="Control" Command="{Binding RedoCommand}" />
<KeyBinding Key="D0" Modifiers="Control" Command="{Binding FitCommand}" />
<KeyBinding Key="D1" Modifiers="Control+Shift" Command="{Binding ActualSizeCommand}" />
<KeyBinding Key="R" Modifiers="Control" Command="{Binding RenderCommand}" />
<KeyBinding Key="A" Modifiers="Control+Shift" Command="{Binding AnalyseCommand}" />
<!-- Owner review 2, R8: Save version of the workspace project. -->
<KeyBinding Key="S" Modifiers="Control" Command="{Binding Project.SaveVersionCommand}" />
<!-- Steps by number; no Alt+NumPad bindings, which type characters into text fields. -->
<KeyBinding Key="D1" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="1" />
<KeyBinding Key="D2" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="2" />
<KeyBinding Key="D3" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="3" />
<KeyBinding Key="D4" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="4" />
<KeyBinding Key="D5" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="5" />
<KeyBinding Key="D6" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="6" />
<KeyBinding Key="D7" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="7" />
<KeyBinding Key="D8" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="8" />
<KeyBinding Key="D9" Modifiers="Alt" Command="{Binding GoToStepCommand}" CommandParameter="9" />
</Grid.InputBindings>
<Grid.RowDefinitions>
<RowDefinition Height="52" />
<RowDefinition Height="Auto" />
<RowDefinition Height="44" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button Style="{StaticResource Button.IconSubtle}" ui:ButtonIcon.Glyph="{StaticResource Icon.Back}" Command="{Binding BackCommand}"
ToolTip="{l:Loc Tooltips.Editor.Back}" AutomationProperties.Name="{l:Loc Editor.Back}" Margin="-6,0,0,0" />
<!-- The title, where a server sequence edited with proxies lives (read-only or out of date says so) and the summary share what the
server job and the actions leave, and give way first: each ends in an ellipsis. The title chooses another sequence (Ctrl+O): the
picker covers the editor until one opens or Esc. Its tooltip and its accessible name start with the whole title. -->
<DockPanel Grid.Column="1" VerticalAlignment="Center">
<Button x:Name="ChangeSequence" DockPanel.Dock="Left" Style="{StaticResource Button.Title}" Margin="2,0,12,0" MaxWidth="340" Padding="6,0"
Command="{Binding DataContext.ChangeSequenceCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
ToolTip="{Binding ChangeToolTip}" ToolTipService.ShowOnDisabled="True" AutomationProperties.Name="{Binding ChangeName}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Title}" Style="{StaticResource Text.Title}" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
<ui:Icon Grid.Column="1" Glyph="{StaticResource Icon.ChevronDown}" Size="14" Margin="6,0,0,0" VerticalAlignment="Center"
Foreground="{DynamicResource Brush.TextMuted}" />
</Grid>
</Button>
<!-- Owner review 2, R8: the workspace project, where it stands, and its menu (versions, sync, history, projects, the local copy). -->
<Button x:Name="ProjectButton" DockPanel.Dock="Left" Style="{StaticResource Button.Subtle}" Margin="0,0,12,0" Padding="8,0" MaxWidth="280" Height="30"
VerticalAlignment="Center" Click="OnOpenProjectMenu" ToolTip="{Binding Project.MenuToolTip}" AutomationProperties.Name="{Binding Project.MenuName}"
Visibility="{Binding HasProject, Converter={StaticResource BoolToVisibility}}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Project.Name}" FontWeight="SemiBold" VerticalAlignment="Center" TextTrimming="CharacterEllipsis" />
<ui:StatusGlyph Grid.Column="1" Kind="{Binding Project.StateKind}" Text="{Binding Project.StateText}" FontSize="12" Margin="8,0,0,0" VerticalAlignment="Center"
infra:LiveRegion.Text="{Binding Project.StateText}" AutomationProperties.LiveSetting="Polite" />
<ui:Icon Grid.Column="2" Glyph="{StaticResource Icon.ChevronDown}" Size="14" Margin="6,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource Brush.TextMuted}" />
</Grid>
<Button.ContextMenu>
<ContextMenu>
<MenuItem Header="{l:Loc Editor.Project.SaveVersion}" Command="{Binding Project.SaveVersionCommand}" InputGestureText="Ctrl+S"
ToolTip="{Binding Project.SaveVersionToolTip}" ToolTipService.ShowOnDisabled="True" />
<MenuItem Header="{l:Loc Editor.Project.Sync}" Command="{Binding Project.SyncCommand}" ToolTip="{Binding Project.StateToolTip}" ToolTipService.ShowOnDisabled="True" />
<MenuItem Header="{l:Loc Editor.Project.History}" Command="{Binding Project.HistoryCommand}" ToolTip="{l:Loc Tooltips.Editor.Project.History}" />
<Separator />
<MenuItem Header="{l:Loc Editor.Project.Open}" Command="{Binding Project.OpenProjectCommand}" ToolTip="{l:Loc Tooltips.Editor.Project.Open}" />
<MenuItem Header="{l:Loc Editor.Project.New}" Command="{Binding Project.NewProjectCommand}" ToolTip="{l:Loc Tooltips.Editor.Project.New}" />
<MenuItem Header="{l:Loc Editor.Project.Rename}" Command="{Binding Project.RenameCommand}" ToolTip="{Binding Project.RenameToolTip}" />
<MenuItem Header="{l:Loc Editor.Project.Delete}" Command="{Binding Project.DeleteCommand}" ToolTip="{Binding Project.DeleteToolTip}"
ToolTipService.ShowOnDisabled="True" />
<Separator />
<MenuItem Header="{l:Loc Editor.Project.CopyOriginals}" Command="{Binding Project.CopyOriginalsCommand}" ToolTip="{Binding Project.CopyOriginalsToolTip}"
ToolTipService.ShowOnDisabled="True" />
<MenuItem Header="{l:Loc Editor.Project.ProxiesOnly}" Command="{Binding Project.ProxiesOnlyCommand}" ToolTip="{Binding Project.ProxiesOnlyToolTip}"
ToolTipService.ShowOnDisabled="True" />
<MenuItem Header="{l:Loc Editor.Project.RemoveCopy}" Command="{Binding Project.RemoveCopyCommand}" ToolTip="{Binding Project.RemoveCopyToolTip}" />
</ContextMenu>
</Button.ContextMenu>
</Button>
<ui:StatusGlyph DockPanel.Dock="Left" Kind="Remote" Text="{Binding RemoteText}" ToolTip="{Binding RemoteToolTip}" FontSize="{StaticResource Size.Body}" Margin="0,0,12,0"
MaxWidth="220" VerticalAlignment="Center" Visibility="{Binding IsRemote, Converter={StaticResource BoolToVisibility}}" />
<TextBlock Text="{Binding Summary}" Style="{StaticResource Text.Secondary}" FontSize="{StaticResource Size.Body}" VerticalAlignment="Center"
TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" ToolTip="{Binding Summary}" />
</DockPanel>
<!-- The server job: its bar, what it is and how far, and Cancel, which always stays (BRIEF §11.5): its own column, so the title gives way
before it at the minimum window. -->
<Grid Grid.Column="2" Margin="12,0,0,0" MaxWidth="300" VerticalAlignment="Center"
Visibility="{Binding ServerJobText, Converter={x:Static ui:NullToCollapsedConverter.Instance}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ProgressBar Width="48" Maximum="1" Value="{Binding ServerJobProgress, Mode=OneWay}" VerticalAlignment="Center" Margin="0,0,8,0"
AutomationProperties.Name="{Binding ServerJobText}" Visibility="{Binding HasServerJobProgress, Converter={StaticResource BoolToVisibility}}" />
<ui:StatusGlyph Grid.Column="1" Kind="{Binding ServerJobKind}" Text="{Binding ServerJobText}" ToolTip="{Binding ServerJobToolTip}"
FontSize="{StaticResource Size.Body}" VerticalAlignment="Center" Typography.NumeralAlignment="Tabular" />
<Button Grid.Column="2" Style="{StaticResource Button.IconSubtle}" Width="26" Height="26" Margin="4,0,0,0" ui:ButtonIcon.Glyph="{StaticResource Icon.Cancel}"
Command="{Binding CancelServerJobCommand}" ToolTip="{Binding CancelServerJobToolTip}" ToolTipService.ShowOnDisabled="True"
AutomationProperties.Name="{l:Loc Editor.ServerJob.Cancel}" />
</Grid>
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="12,0,0,0">
<Button Content="{l:Loc Editor.Analyse}" Command="{Binding AnalyseCommand}" ToolTip="{Binding AnalyseToolTip}" ToolTipService.ShowOnDisabled="True" />
<Button Content="{l:Loc Editor.OptimiseAll}" Command="{Binding OptimiseAllCommand}" ToolTip="{Binding OptimiseAllToolTip}"
ToolTipService.ShowOnDisabled="True" Margin="12,0,0,0" />
<v:SplitButton x:Name="RenderButton" IsPrimary="True" Margin="12,0,0,0" Content="{Binding RenderText}" Command="{Binding RenderCommand}"
ItemsSource="{Binding RenderChoices}" DisplayMemberPath="Label" SelectedItem="{Binding SelectedRenderChoice}" ToolTip="{Binding RenderToolTip}"
ToolTipService.ShowOnDisabled="True" DropDownToolTip="{Binding RenderChoiceToolTip}"
AutomationProperties.Name="{l:Loc Editor.RenderButton}" />
</StackPanel>
</Grid>
<!-- Owner review 2, R8: the home's frames (the library's or the server's) moved past the workspace's; Update media copies them again (positions follow their photos). -->
<Border Grid.Row="1" Style="{StaticResource Border.Card}" Padding="12,6" Margin="0,0,0,8"
Visibility="{Binding Project.HasMediaUpdate, Converter={StaticResource BoolToVisibility}, FallbackValue=Collapsed}">
<DockPanel>
<Button DockPanel.Dock="Right" Style="{StaticResource Button.Compact}" Content="{l:Loc Editor.Workspace.UpdateMedia}" Command="{Binding Project.UpdateMediaCommand}"
ToolTip="{Binding Project.UpdateMediaToolTip}" ToolTipService.ShowOnDisabled="True" />
<ui:StatusGlyph Kind="Warning" Text="{Binding Project.MediaUpdateText}" ToolTip="{Binding Project.MediaChangedToolTip}" VerticalAlignment="Center"
infra:LiveRegion.Text="{Binding Project.MediaUpdateText}" AutomationProperties.LiveSetting="Polite" />
</DockPanel>
</Border>
<!-- The path (owner review 1, R7): one row of steps, each with where it stands; any step opens at any time (Alt+n, ←/→ in the bar). -->
<ListBox x:Name="Steps" Grid.Row="2" Style="{StaticResource ListBox.Steps}" ItemsSource="{Binding Tabs}" SelectedItem="{Binding SelectedTab}"
ItemContainerStyle="{StaticResource ListBoxItem.Step}" Margin="0,0,0,8" AutomationProperties.Name="{l:Loc Editor.Path}" KeyDown="OnStepsKeyDown"
PreviewKeyDown="OnStepsPreviewKeyDown" PreviewMouseLeftButtonDown="OnStepsPreviewMouseDown" SelectionChanged="OnStepsSelectionChanged" />
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="{StaticResource Editor.Grid.Panel}" />
</Grid.ColumnDefinitions>
<Grid Margin="0,0,16,0">
<Grid.RowDefinitions>
<RowDefinition MinHeight="160">
<RowDefinition.Style>
<Style TargetType="RowDefinition">
<Setter Property="Height" Value="{StaticResource Editor.Grid.Preview}" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsTallMeasure}" Value="True">
<Setter Property="Height" Value="{StaticResource Editor.Grid.ExportPreview}" />
</DataTrigger>
</Style.Triggers>
</Style>
</RowDefinition.Style>
</RowDefinition>
<RowDefinition Height="Auto" />
<RowDefinition MinHeight="150">
<RowDefinition.Style>
<Style TargetType="RowDefinition">
<Setter Property="Height" Value="{StaticResource Editor.Grid.Measure}" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsTallMeasure}" Value="True">
<Setter Property="Height" Value="{StaticResource Editor.Grid.ExportMeasure}" />
</DataTrigger>
</Style.Triggers>
</Style>
</RowDefinition.Style>
</RowDefinition>
</Grid.RowDefinitions>
<v:PreviewViewport x:Name="Preview" Source="{Binding PreviewImage}" OriginalSource="{Binding OriginalImage}" IsCompareEnabled="{Binding IsCompare}"
WipeLabel="{Binding WipeLabel}" ZoomMode="{Binding ZoomMode, Mode=TwoWay}" ShowVectors="{Binding ViewVectors}"
MotionVectors="{Binding MotionVectors}" VectorScale="{Binding VectorScale}" ShowRegions="{Binding ViewRegions}"
RegionBoundary="{Binding RegionBoundary}" ShowCropMask="{Binding ShowCropMask}" CropRect="{Binding CropRect}"
CropMaskMode="{Binding CropMaskMode}" InfoText="{Binding InfoText}" ToolTip="{l:Loc Tooltips.Editor.Preview.View}"
AutomationProperties.Name="{l:Loc Editor.Preview}" SizeChanged="OnPreviewSizeChanged">
<v:PreviewViewport.ToolsContent>
<!-- Tools give the keyboard back to the preview after a click, so Space keeps playing (OnToolClicked). They take a second
line rather than lose Play and Full screen where long labels meet a narrow preview (1200 px, 200 px rail). -->
<WrapPanel ButtonBase.Click="OnToolClicked" Margin="0,0,0,-6">
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding IsCompare}" ui:ButtonIcon.Glyph="{StaticResource Icon.Compare}"
Content="{l:Loc Editor.Preview.Compare}" ToolTip="{l:Loc Tooltips.Editor.Preview.Compare}" />
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
IsChecked="{Binding ShowVectors}" ui:ButtonIcon.Glyph="{StaticResource Icon.Vectors}" Content="{l:Loc Editor.Preview.Vectors}"
ToolTip="{l:Loc Tooltips.Editor.Preview.Vectors}" />
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
IsChecked="{Binding ShowRegions}" ui:ButtonIcon.Glyph="{StaticResource Icon.Regions}" Content="{l:Loc Editor.Preview.Regions}"
ToolTip="{l:Loc Tooltips.Editor.Preview.Regions}" />
<ToggleButton Style="{StaticResource ToggleButton.PreviewTool}" IsChecked="{Binding ShowCropMask}" ui:ButtonIcon.Glyph="{StaticResource Icon.CropMask}"
Content="{l:Loc Editor.Preview.CropMask}" ToolTip="{l:Loc Tooltips.Editor.Preview.CropMask}" />
<!-- "What I lose" (dimmed) or "how it will look" (hidden) outside the crop (BRIEF §12.3), beside the mask and always there (disabled
while the mask is off), so turning the mask on never moves the other tools to another line. -->
<ToggleButton Style="{StaticResource ToggleButton.PreviewToolIcon}" IsChecked="{Binding IsCropResult}" IsEnabled="{Binding ShowCropMask}"
ui:ButtonIcon.Glyph="{StaticResource Icon.Eye}" ToolTip="{Binding CropModeToolTip}" ToolTipService.ShowOnDisabled="True"
AutomationProperties.Name="{l:Loc Editor.Preview.CropResult}" />
<ToggleButton Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource ToggleButton.PreviewTool}"
IsChecked="{Binding IsActualSize}" Content="{l:Loc Editor.Preview.ActualSize}" ToolTip="{l:Loc Tooltips.Editor.Preview.OneToOne}" />
<Button Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource Button.PreviewToolIcon}"
ui:ButtonIcon.Glyph="{StaticResource Icon.Fullscreen}" Click="OnFullScreen" ToolTip="{l:Loc Tooltips.Editor.Preview.FullScreen}"
AutomationProperties.Name="{l:Loc Editor.Preview.FullScreen}" />
<Button Visibility="{Binding IsExportTab, Converter={x:Static ui:InverseBoolToVisibilityConverter.Instance}}" Style="{StaticResource Button.PlayTool}"
Command="{Binding PlayCommand}" ToolTip="{Binding PlayToolTip}" AutomationProperties.Name="{Binding PlayName}" />
<Button Content="{l:Loc Editor.Preview.Clip}" Command="{Binding PreviewClipCommand}" ToolTip="{Binding ClipToolTip}"
Visibility="{Binding IsExportTab, Converter={StaticResource BoolToVisibility}}">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource Button.PreviewTool}">
<Setter Property="ui:ButtonIcon.Glyph" Value="{StaticResource Icon.Play}" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsPlaying}" Value="True">
<Setter Property="ui:ButtonIcon.Glyph" Value="{StaticResource Icon.Pause}" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</WrapPanel>
</v:PreviewViewport.ToolsContent>
</v:PreviewViewport>
<!-- The frame on screen cannot be read: one sentence instead of another frame's picture. -->
<TextBlock Text="{Binding PreviewMessage}" Style="{StaticResource Text.Secondary}" HorizontalAlignment="Center" VerticalAlignment="Center"
IsHitTestVisible="False" Visibility="{Binding PreviewMessage, Converter={x:Static ui:NullToCollapsedConverter.Instance}}" />
<v:Filmstrip Grid.Row="1" Margin="0,10,0,0" Source="{Binding Thumbnails}" CurrentIndex="{Binding CurrentIndex, Mode=TwoWay}" Markers="{Binding Markers}"
ToolTip="{l:Loc Tooltips.Editor.Filmstrip}" AutomationProperties.Name="{l:Loc Editor.Filmstrip}" />
<!-- The step's measuring tool. -->
<ContentControl x:Name="StepMeasure" Grid.Row="2" Content="{Binding SelectedTab}" Focusable="False">
<ContentControl.Resources>
<ResourceDictionary Source="pack://application:,,,/Chronos;component/Editor/EditorMeasures.xaml" />
</ContentControl.Resources>
</ContentControl>
</Grid>
<!-- The step's column, then Previous · 3 / 8 · Next. -->
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ContentControl x:Name="StepPanel" Content="{Binding SelectedTab}" Focusable="False">
<ContentControl.Resources>
<ResourceDictionary Source="pack://application:,,,/Chronos;component/Editor/EditorPanels.xaml" />
</ContentControl.Resources>
</ContentControl>
<!-- Both buttons are measured whole (the longest "Next sequence" fits the 320 px column in every language); the counter takes
what they leave and gives way first. -->
<Grid Grid.Row="1" Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button x:Name="PreviousStep" ui:ButtonIcon.Glyph="{StaticResource Icon.ChevronLeft}" Content="{l:Loc Editor.Step.Previous}"
Command="{Binding PreviousStepCommand}" ToolTip="{Binding PreviousToolTip}" ToolTipService.ShowOnDisabled="True" />
<!-- The step counter says each step change to screen readers ("Step 3 of 8: Exposure, Auto"). -->
<TextBlock Grid.Column="1" Text="{Binding StepCounter}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" HorizontalAlignment="Center"
Margin="8,0" TextTrimming="CharacterEllipsis" Typography.NumeralAlignment="Tabular" infra:LiveRegion.Text="{Binding StepAnnouncement}"
AutomationProperties.LiveSetting="Polite" />
<Button x:Name="NextStep" Grid.Column="2" Command="{Binding NextStepCommand}" ToolTip="{Binding NextToolTip}" ToolTipService.ShowOnDisabled="True"
AutomationProperties.Name="{Binding NextText}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding NextText}" VerticalAlignment="Center" />
<ui:Icon Glyph="{StaticResource Icon.ChevronRight}" Size="14" Margin="6,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Button>
</Grid>
</Grid>
</Grid>
</Grid>
</Grid>
<!-- The picker (owner review 1, R7): without an open sequence, or over it after Change sequence. -->
<sections:SequencePickerView x:Name="Picker" Visibility="{Binding ShowsPicker, Converter={StaticResource BoolToVisibility}}" IsEnabled="{Binding IsContentEnabled}" />
<!-- In-window dialogs (Open in workspace, the project menu's) over a scrim; the keyboard stays inside the dialog. -->
<Grid Visibility="{Binding IsDialogOpen, Converter={StaticResource BoolToVisibility}}" KeyboardNavigation.TabNavigation="Cycle"
KeyboardNavigation.ControlTabNavigation="Cycle" KeyboardNavigation.DirectionalNavigation="Contained">
<Border Background="{DynamicResource Brush.Scrim}" />
<ContentPresenter x:Name="DialogHost" Content="{Binding Dialog}" Margin="20" />
</Grid>
</Grid>
</UserControl>