From 90f5ad50dd693543fdbdd147bb2c2b8a988e52dd Mon Sep 17 00:00:00 2001 From: gramps Date: Sun, 30 Aug 2026 09:13:47 -0700 Subject: [PATCH] =?UTF-8?q?refactor:=20extract=20TopBar=20out=20of=20MainW?= =?UTF-8?q?indow.xaml=20=E2=80=94=20Phase=202,=20Commit=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TopBar.xaml(.cs) takes the Row 0 top controls: logo/About button, REC/ON-AIR pills + status signs, avatar, Sign In/Start/End buttons. The avatar fetch (AvatarHttp/_loadedAvatarUrl/LoadAvatarImage/ShowAvatarFallback) moved into the control with async semantics preserved; the window grabs the control via FindName in its ctor and calls _topBar.RefreshAvatar() when IsConnected or AccountAvatarUrl changes (previously OnViewModelPropertyChanged -> LoadAvatarImage). AccountLight is pure binding (never touched by code-behind) so it moved with the XAML. Zero behavior change; build 0 warnings; 246 pass, only the 2 known failures. Also dropped the now-unused System.IO using from MainWindow.xaml.cs. Docs: ViewModels/index.md Phase 2 tracker updated in the same commit. --- Controls/TopBar.xaml | 118 ++++++++++++++++++++++++++++++++++++++++ Controls/TopBar.xaml.cs | 72 ++++++++++++++++++++++++ MainWindow.xaml | 114 +------------------------------------- MainWindow.xaml.cs | 55 ++----------------- ViewModels/index.md | 3 +- 5 files changed, 197 insertions(+), 165 deletions(-) create mode 100644 Controls/TopBar.xaml create mode 100644 Controls/TopBar.xaml.cs diff --git a/Controls/TopBar.xaml b/Controls/TopBar.xaml new file mode 100644 index 0000000..d53a6f2 --- /dev/null +++ b/Controls/TopBar.xaml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -