Window with ExtendClientAreaToDecorationsHint="True" cannot be moved in 0.10.5
See original GitHub issueDescribe the bug In version 0.10.3 moving window with flag ExtendClientAreaToDecorationsHint = “True” worked fine. I also checked version 0.10.4 and there it works too. After upgrading package to version 0.10.5 window is stuck in place and cannot be moved.
To Reproduce
- Create avalonia project (mine is creating in vesrion 0.10.3 by default and im and creating MVVM template).
- Upgrade Avalonia packages to version 0.10.5 (Avalonia, Avalonia.Desktop, Avalonia.Diagnostics, Avalonia.ReactiveUI).
- In MainWindow.axaml add flag
ExtendClientAreaToDecorationsHint="True"in Window tag. Xaml is looking like this
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:AvaloniaMoveTest.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaMoveTest.Views.MainWindow"
Icon="/Assets/avalonia-logo.ico"
Title="AvaloniaMoveTest"
ExtendClientAreaToDecorationsHint="True">
<Design.DataContext>
<vm:MainWindowViewModel/>
</Design.DataContext>
<TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Window>
- Build project and run.
- Window cannot be moved.
Expected behavior Should be possible to move window with mouse.
Desktop (please complete the following information):
- OS: Window
- Version: 20H2 (19042.985)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Cannot move window via top bar or resize window after ...
Click and drag the window using the top bar, notice it works normally · Go to settings to add account, click add account...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I was also affected by the issue in 0.10.18. Adding margin to the root control helped to restore the draggable header.
Is it so by design now? Documentation should probably be updated to explain this caveat. How should I go about adding non-interactive elements to the header area without affecting the window draggability?
Update: Setting
ExtendClientAreaChromeHints="PreferSystemChrome"on my Window as found there had no observable effect. SettingCanResizeexplicitly to any value has no observable effect.Update 2: Using
IsHitTestVisibleallows to have controls in the header area without affecting the draggability.Confirmed as fixed in 0.10.6, closeable?