Make MainWindow partial and add a XAML skeleton with named hosts (MenuHost, ContentGrid, StatusHost, OverlayHost). Replace BuildRoot/AssignContent/ResolveControls with InitializeComponent plus imperative population of the named hosts; existing menu/sensor/plot/overlay builders are unchanged so later sub-steps can replace each region declaratively. Bind OverlayHost.Visibility to HardwareLoadingVisibility so the empty host does not intercept hit-testing once loading completes. Builders that previously assigned via the brittle Children[] casting now use out params. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
30 lines
1.3 KiB
XML
30 lines
1.3 KiB
XML
<!-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
Copyright (C) LibreHardwareMonitor and Contributors. -->
|
|
<Window
|
|
x:Class="LibreHardwareMonitor.Windows.WinUI.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:LibreHardwareMonitor.Windows.WinUI">
|
|
<Grid x:Name="RootGrid">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid x:Name="MenuHost" Grid.Row="0" />
|
|
<Grid x:Name="ContentGrid" Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="320" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="220" />
|
|
</Grid.RowDefinitions>
|
|
</Grid>
|
|
<Grid x:Name="StatusHost" Grid.Row="2" />
|
|
<Grid x:Name="OverlayHost" Grid.RowSpan="3" />
|
|
</Grid>
|
|
</Window>
|