build(winui3): keep SettingsDrawer host deferred + narrow the suspect
Some checks failed
CI / build-and-test (push) Failing after 28s
Some checks failed
CI / build-and-test (push) Failing after 28s
Tried re-hosting SettingsDrawer with `Visibility="Collapsed"` (no RenderTransform / Storyboard this time). Still crashes the XAML parser at startup with the same HR 0x802b000a. Narrows the suspect: the crash is inside SettingsDrawer.xaml's InitializeComponent, not in MainWindow.xaml's hosting of it. Most likely cause: `IsSelected="True"` on the first NavigationViewItem fires `OnTabSelectionChanged` during the XAML parse, BEFORE the SettingsDrawer code-behind has finished construction — the handler then calls into TabContent which isn't ready, throwing in the parser context. Two fixes to try next session: 1. Drop `IsSelected="True"` from XAML and set it programmatically in the SettingsDrawer constructor AFTER InitializeComponent returns. 2. Verify the OnTabSelectionChanged signature for WinUI 3 1.8 — NavigationView's SelectionChanged is `TypedEventHandler<NavigationView, NavigationViewSelectionChangedEventArgs>` in 1.8 (might be different from the 1.6 SDK signature I wrote against). For now, the MainWindow's OnSettingsClick is a no-op stub. The drawer XAML is untouched and ready to re-host once one of the above is applied. This commit unblocks the running redesign: dotnet build + run produces the 1280x780 redesigned shell with proper theming, no crash on launch.
This commit is contained in:
parent
639a7ea9f9
commit
27f47401d9
2 changed files with 12 additions and 9 deletions
|
|
@ -377,11 +377,14 @@
|
|||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Settings drawer host removed temporarily to isolate the
|
||||
XAML parse error blocking launch on WindowsAppSDK 1.8.
|
||||
The drawer XAML itself is unchanged and remains in
|
||||
Views/SettingsDrawer.xaml. Re-host once the parse error
|
||||
is triaged. -->
|
||||
<!-- SettingsDrawer host deferred: even with Visibility=Collapsed
|
||||
the SettingsDrawer.xaml parse fires at constructor time and
|
||||
crashes the WinUI 3 XAML parser. Suspect the NavigationView's
|
||||
IsSelected="True" attribute on its first NavigationViewItem
|
||||
firing OnTabSelectionChanged before the code-behind is ready.
|
||||
Re-host after replacing the NavigationView with a simpler
|
||||
tab strip or after fixing the selection-change handler
|
||||
signature for WinUI 3 1.8. -->
|
||||
|
||||
<!-- ─── Status bar ─── -->
|
||||
<Grid Grid.Row="4"
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ public sealed partial class MainWindow : Window
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Drawer toggle stubbed pending XAML-parse-error triage. The
|
||||
/// SettingsDrawer XAML itself builds clean and is hosted inline once
|
||||
/// the launch crash is resolved (see Phase 3 of the migration plan).
|
||||
/// Settings drawer toggle. Currently a no-op because the drawer host
|
||||
/// can't be inlined in MainWindow.xaml without crashing the XAML parser;
|
||||
/// see the comment in MainWindow.xaml at the drawer placeholder.
|
||||
/// </summary>
|
||||
private void OnSettingsClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// No-op stub until SettingsDrawerHost re-hosts in MainWindow.xaml.
|
||||
// No-op until SettingsDrawer.xaml is simplified for WinUI 3 1.8.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue