Repository navigation
Description
Current behavior 🐛
On Skia Win32, a NavigationView in LeftCompact mode shows an empty pane after the window is minimized and restored. The menu and footer items are gone; only the pane background is drawn.
- The items are still in the visual tree, loaded, visible and laid out at the right size and place. UI Automation reports them with empty bounds and off-screen.
- Waiting, maximizing, or minimizing again does not bring them back. Resizing the window below the app's narrow breakpoint and back does.
- Seen on every attempt (Windows 11, 150% display scaling).
The pane is clipped away. After the restore, PaneRoot's clip (PaneClipRectangleTransform.TranslateX) is +72 instead of −248 (CompactPaneLength − OpenPaneLength = 72 − 320). The clip then covers x 72..392, so the 0..72 compact strip shows nothing.
Expected behavior 🎯
After a minimize and restore, the compact pane looks and works as before.
More generally: when SplitView.OpenPaneLength or CompactPaneLength changes while a display-mode state is active, the pane clip follows the new length.
How to reproduce it (as minimally and precisely as possible) 🔬
Minimal, deterministic (no minimize needed, any Skia target):
var splitView = new SplitView
{
Width = 600,
Height = 400,
DisplayMode = SplitViewDisplayMode.CompactOverlay,
CompactPaneLength = 72,
OpenPaneLength = 0,
Pane = new Border(),
Content = new Border(),
};
// Put it on screen and wait until it is loaded.
splitView.OpenPaneLength = 320;
// Find "PaneRoot" in the template: ((CompositeTransform)((RectangleGeometry)paneRoot.Clip).Transform).TranslateX
// Expected: 72 - 320 = -248. Actual: 72 (the value computed when ClosedCompactLeft was entered at length 0).The user-facing scenario (Skia Win32):
-
Use a
NavigationViewwithPaneDisplayMode="LeftCompact"and a few menu/footer items, plus anAdaptiveTriggerthat switches it toLeftMinimalwhen narrow:<VisualStateGroup> <VisualState x:Name="Narrow"> <VisualState.StateTriggers><AdaptiveTrigger MinWindowWidth="0" /></VisualState.StateTriggers> <VisualState.Setters> <Setter Target="Nav.PaneDisplayMode" Value="LeftMinimal" /> </VisualState.Setters> </VisualState> <VisualState x:Name="Wide"> <VisualState.StateTriggers><AdaptiveTrigger MinWindowWidth="700" /></VisualState.StateTriggers> </VisualState> </VisualStateGroup>
-
Run on Windows (Skia desktop) with the window wider than 700.
-
Minimize the window (title bar, taskbar or Win+D), then restore it.
-
The compact pane is empty.
Workaround 🛠️
Re-enter the SplitView's current DisplayModeStates state whenever OpenPaneLength changes, so its setters are read again:
splitView.RegisterPropertyChangedCallback(SplitView.OpenPaneLengthProperty, (s, _) =>
{
var split = (SplitView)s;
var state = /* current state of the "DisplayModeStates" group on the template root */;
if (state is not null && state != "Closed")
{
VisualStateManager.GoToState(split, "Closed", false);
VisualStateManager.GoToState(split, state, false);
}
});OnPropertyChanged2 runs before callbacks registered this way, so the template settings are already updated when it runs. Resizing the window below the narrow breakpoint and back also recovers.
Affected platforms 📱💻🖥️
Skia Desktop (Windows) for the minimize trigger. The SplitView refresh problem itself is not platform-specific; the minimal repro above fails on Skia desktop.
Uno.Sdk version (and other relevant versions) 📦
Uno.Sdk.Private 7.1.0-dev.484 (commit 514df92). The code paths below are unchanged on master 7223920.
IDE version 🧑💻
N/A
Anything else we need to know? 💬
Two defects combine. Fixing either one removes the symptom; the first is the general one.
1. A changed pane length never reaches the active state's setters (all platforms).
- The Fluent
SplitViewtemplate sets the clip with a bound setter, e.g.ClosedCompactLeft:<Setter Target="PaneClipRectangleTransform.TranslateX" Value="{Binding …TemplateSettings.NegativeOpenPaneLengthMinusCompactLength}" />(SplitView_themeresources.xaml). - The setter's target keeps the value read when the state was entered.
SplitView.OnPropertyChanged2handlesOpenPaneLength/CompactPaneLengthwithUpdateTemplateSettings()thenUpdateVisualState(useTransitions: false), commented "Force the bindings in our VisualState animations to refresh".- But
VisualStateManager.GoToStateCorePrivateBaseImplementationreturns early when the group is already in the requested state ("Already in the right state"), so nothing is refreshed.
2. A minimized Win32 window is laid out at 0×0.
Win32WindowWrapperhandlesWM_SIZEwithSIZE_MINIMIZEDlike any resize:OnWindowSizeOrLocationChangedreads the 0×0 client rect intoBounds/VisibleBounds.- The whole tree is then measured at 0×0. Adaptive triggers flip to their narrowest state, and
ItemsRepeaterunrealizes its items. NavigationView.UpdateOpenPaneLengthcaps the open pane length to the width, soOpenPaneLengthgoes 320 → 0.- Related: [Win32] Window.Activated reports an activated state while minimized, and visibility ignores minimize/restore #26532 (activation and visibility on minimize/restore).
Sequence on restore:
- The window bounds come back; the app's
AdaptiveTriggerswitchesPaneDisplayModeback toLeftCompact. SplitView.DisplayModebecomesCompactOverlayand entersClosedCompactLeftwhileOpenPaneLengthis still 0. The setter writesTranslateX = 72 − 0 = +72.NavigationView.OnSizeChangedthen restoresOpenPaneLength = 320. The template settings update to −248, but the refresh in step (1) above is a no-op, soTranslateXstays +72.
From reading the code (not tested), PaneDisplayMode="Auto" alone should not show it: NavigationView.OnSizeChanged calls UpdateOpenPaneLength before UpdateAdaptiveLayout, so the compact state is entered with the restored length.
A narrower window shows the same staleness without the symptom. After a round trip through a 252 px wide window, TranslateX stays at −180 (72 − 252) instead of −248. The clip is wrong but still covers the compact strip.
Activity
MartinZikmund commentedon Nov 24, 2026
@ajpinedam can you confirm whether the issue is coming from WinAppSDK?
ajpinedam commentedon Nov 24, 2026
@MartinZikmund
No, it doesn't come from WinAppSDK. It only happens on the Skia desktop target (Uno's Win32 host); native WinUI behaves correctly:
I ran the same NavigationView page (LeftCompact with an AdaptiveTrigger switching to LeftMinimal) in a WinAppSDK app. After minimize/restore the compact pane is intact