You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At 125% display scaling on Windows, DockPanel.Dock="Bottom" content is not rendered at all — the sibling Fill element (the last, un-docked child) paints over the entire remaining area with no visible trace of the docked content, and no error, warning, or exception of any kind.
At 100% scaling, the identical XAML renders correctly.
This reproduces with the two most basic controls Avalonia has (TextBlock + Border), with no bindings, styles, or custom controls involved, so it isn't specific to any particular app.
Reproduction steps
Create a new Avalonia app from the default template (dotnet new avalonia.app).
Set the Windows display scaling to 125% (Settings → System → Display → Scale).
Expected: a yellow "BOTTOM TEXT" strip at the bottom of the window, light blue everywhere else (matches the behavior at 100% scaling, and matches WPF's DockPanel behavior).
Actual: the window is solid light blue — the bottom-docked TextBlock never appears. No exception, no binding error, no XAML warning. Confirmed via a real desktop screen capture (not a PrintWindow/GDI capture, to rule out a screenshot-tool artifact) with the window genuinely in the foreground.
Setting DockPanel.Dock="Top" on the same TextBlock (with the same Border as the trailing/fill child) works correctly at 125% scaling — only Bottom is affected in my testing (I did not exhaustively test Left/Right).
What I've ruled out
I hit this in a real app (a DockPanel inside a UserControl inside a Window, with real bindings) and spent considerable effort isolating the actual cause before landing on display scaling. Along the way I ruled out:
Avalonia version: reproduces identically on 11.3.20 (latest stable 11.x) and 12.1.1 (latest stable 12.x) — not a v12-specific regression.
Rendering backend: reproduces identically with Win32PlatformOptions.RenderingMode = [Win32RenderingMode.Software] forced — not a GPU/driver-specific compositing issue. (Machine has a hybrid Intel UHD 630 / NVIDIA GTX 1650 Max-Q Optimus setup, in case that's independently relevant to anyone else's repro.)
Client-side decorations: reproduces identically with WindowDecorations="Full" + ExtendClientAreaToDecorationsHint="False" explicitly set (i.e. not specific to the new Avalonia 12 app-drawn decorations path).
AvaloniaUI.DiagnosticsSupport / .WithDeveloperTools(): reproduces identically with that hook removed entirely.
UseLayoutRounding="False" on the Window (the fix for Layout precision error in Avalonia 11 #8866, a different fractional-DPI layout bug that also manifests specifically at 125%): does not fix this — so this looks like a distinct issue from Layout precision error in Avalonia 11 #8866, just triggered by the same category of non-integer scale factor.
The one variable that reliably flips the behavior, tested by switching the actual Windows display scaling setting (not a manifest/registry per-app DPI override) and relaunching each time:
Scaling
Result
100%
✅ Bottom-docked content renders correctly
125%
❌ Bottom-docked content invisible
Environment
Avalonia: 11.3.20 and 12.1.1 (both tested, same result)
Display scaling: 125% (bug present) vs 100% (bug absent), single monitor, no mixed-DPI setup involved
Possibly related
I found some older/adjacent reports that may share a root cause or at least the same general area of the layout engine, though none matches this exactly:
Panel does not take all remaining space #4628 (closed) — a comment from a different user describes the same "DockPanel Top/Bottom docks overlap in newer versions, Grid RowDefinitions="Auto,*,Auto" works instead" symptom, but in my own testing that Grid pattern (Auto-row-after-*-row) also failed to render the trailing content at 125% scaling — so if it's the same bug, the reported workaround isn't reliable either, at least not on this setup.
Layout precision error in Avalonia 11 #8866 — the closest DPI-specific precedent I found (also 125%-specific, also fine at 100%), but its confirmed root cause (Border not accounting for its own layout rounding when arranging an opaque child) and its fix (UseLayoutRounding="False") do not apply here — I tested it directly and it made no difference.
Happy to provide a runnable repro project if useful.
Describe the bug
At 125% display scaling on Windows,
DockPanel.Dock="Bottom"content is not rendered at all — the siblingFillelement (the last, un-docked child) paints over the entire remaining area with no visible trace of the docked content, and no error, warning, or exception of any kind.At 100% scaling, the identical XAML renders correctly.
This reproduces with the two most basic controls Avalonia has (
TextBlock+Border), with no bindings, styles, or custom controls involved, so it isn't specific to any particular app.Reproduction steps
dotnet new avalonia.app).MainWindow.axamlcontent with:Expected: a yellow "BOTTOM TEXT" strip at the bottom of the window, light blue everywhere else (matches the behavior at 100% scaling, and matches WPF's
DockPanelbehavior).Actual: the window is solid light blue — the bottom-docked
TextBlocknever appears. No exception, no binding error, no XAML warning. Confirmed via a real desktop screen capture (not aPrintWindow/GDI capture, to rule out a screenshot-tool artifact) with the window genuinely in the foreground.Setting
DockPanel.Dock="Top"on the sameTextBlock(with the sameBorderas the trailing/fill child) works correctly at 125% scaling — onlyBottomis affected in my testing (I did not exhaustively testLeft/Right).What I've ruled out
I hit this in a real app (a
DockPanelinside aUserControlinside aWindow, with real bindings) and spent considerable effort isolating the actual cause before landing on display scaling. Along the way I ruled out:Win32PlatformOptions.RenderingMode = [Win32RenderingMode.Software]forced — not a GPU/driver-specific compositing issue. (Machine has a hybrid Intel UHD 630 / NVIDIA GTX 1650 Max-Q Optimus setup, in case that's independently relevant to anyone else's repro.)WindowDecorations="Full"+ExtendClientAreaToDecorationsHint="False"explicitly set (i.e. not specific to the new Avalonia 12 app-drawn decorations path).AvaloniaUI.DiagnosticsSupport/.WithDeveloperTools(): reproduces identically with that hook removed entirely.UseLayoutRounding="False"on theWindow(the fix for Layout precision error in Avalonia 11 #8866, a different fractional-DPI layout bug that also manifests specifically at 125%): does not fix this — so this looks like a distinct issue from Layout precision error in Avalonia 11 #8866, just triggered by the same category of non-integer scale factor.The one variable that reliably flips the behavior, tested by switching the actual Windows display scaling setting (not a manifest/registry per-app DPI override) and relaunching each time:
Environment
Possibly related
I found some older/adjacent reports that may share a root cause or at least the same general area of the layout engine, though none matches this exactly:
Grid RowDefinitions="Auto,*,Auto"works instead" symptom, but in my own testing thatGridpattern (Auto-row-after-*-row) also failed to render the trailing content at 125% scaling — so if it's the same bug, the reported workaround isn't reliable either, at least not on this setup.DockPaneldock-order/overlay rendering bugs, possibly unrelated but in the same area of the codebase.Bordernot accounting for its own layout rounding when arranging an opaque child) and its fix (UseLayoutRounding="False") do not apply here — I tested it directly and it made no difference.Happy to provide a runnable repro project if useful.