refactor: extract BottomBar out of MainWindow.xaml — Phase 2, Commit 12
New Controls/ folder + namespace ytLive.Controls. BottomBar takes the Grid.Row=3 footer: gear menu button (with its GearButton_Click handler moved to the control's code-behind), centered stream-stats (bitrate/FPS/dropped/ duration/health), and the quality dropdown. All bindings inherit the window DataContext; app-level styles resolve from Themes/Controls.xaml as before. Zero behavior change; build 0 warnings; 246 pass, only the 2 known failures. Docs: ViewModels/index.md tracker gains a Phase 2 section in the same commit.
This commit is contained in:
@@ -291,16 +291,6 @@ public partial class MainWindow : Window
|
||||
e.Handled = true; // the button's right-click context menu must not fire
|
||||
}
|
||||
|
||||
private void GearButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button { ContextMenu: { } menu } button)
|
||||
{
|
||||
menu.PlacementTarget = button;
|
||||
menu.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
|
||||
menu.IsOpen = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void BackToAbout_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.MainViewModel vm)
|
||||
|
||||
Reference in New Issue
Block a user