From 73397cfea7b84233a10052f9a6e114d42ffd999b Mon Sep 17 00:00:00 2001 From: gramps Date: Sun, 30 Aug 2026 19:39:51 -0700 Subject: [PATCH] =?UTF-8?q?refactor:=20extract=20SceneThumbnailStrip=20out?= =?UTF-8?q?=20of=20MainWindow.xaml=20=E2=80=94=20Phase=202,=20Commit=2016?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SceneThumbnailStrip.xaml(.cs) takes the Row 0 scene-picker strip (ItemsControl over Scenes with staged/live border highlight); Thumbnail_MouseLeftButtonDown moved into the control, transitioning via DataContext.TransitionToScene. Zero behavior change; build 0 warnings; 246 pass, only the 2 known failures. Docs: ViewModels/index.md Phase 2 tracker updated in the same commit. --- Controls/SceneThumbnailStrip.xaml | 54 ++++++++++++++++++++++++++++ Controls/SceneThumbnailStrip.xaml.cs | 21 +++++++++++ MainWindow.xaml | 52 +-------------------------- MainWindow.xaml.cs | 7 ---- ViewModels/index.md | 3 +- 5 files changed, 78 insertions(+), 59 deletions(-) create mode 100644 Controls/SceneThumbnailStrip.xaml create mode 100644 Controls/SceneThumbnailStrip.xaml.cs diff --git a/Controls/SceneThumbnailStrip.xaml b/Controls/SceneThumbnailStrip.xaml new file mode 100644 index 0000000..4d8228a --- /dev/null +++ b/Controls/SceneThumbnailStrip.xaml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Controls/SceneThumbnailStrip.xaml.cs b/Controls/SceneThumbnailStrip.xaml.cs new file mode 100644 index 0000000..75ce9a0 --- /dev/null +++ b/Controls/SceneThumbnailStrip.xaml.cs @@ -0,0 +1,21 @@ +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using ytLive.Models; +using ytLive.ViewModels; + +namespace ytLive.Controls; + +public partial class SceneThumbnailStrip : UserControl +{ + public SceneThumbnailStrip() + { + InitializeComponent(); + } + + private void Thumbnail_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (sender is Border { DataContext: Scene scene } && DataContext is MainViewModel vm) + vm.TransitionToScene(scene); + } +} \ No newline at end of file diff --git a/MainWindow.xaml b/MainWindow.xaml index fff5c87..905ed84 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -93,57 +93,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +