Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window position shifts when size changes with taskbar on left or top #16217

Open
kirb opened this issue Jul 3, 2024 · 1 comment
Open

Window position shifts when size changes with taskbar on left or top #16217

kirb opened this issue Jul 3, 2024 · 1 comment
Labels
bug help-wanted A contribution from the community would be most welcome. os-windows

Comments

@kirb
Copy link

kirb commented Jul 3, 2024

Describe the bug

When the user has moved their Windows taskbar from the default position at the bottom to the left or top, Avalonia windows that use SizeToContent="Width/Height/WidthAndHeight" and CanResize="False", and then experience a change in width or height, shift down or across the screen significantly. The shift appears to equal the width of the taskbar if on the left, or height if on top.

To Reproduce

Test case: AvaloniaCarouselShiftBug.zip

Reproducible on Windows 10, and Windows 11 with ExplorerPatcher or StartAllBack. Not able to reproduce on macOS 14.5 or 15.0b2 (with the dock or menu bar).

  1. Build and run the test case
  2. With taskbar at the bottom, click "Height++". Observe no position change.
  3. Move taskbar to left, click "Height++". Observe window shifts to the right.
  4. Move taskbar to top, click "Height++". Observe window shifts down.
  5. In AvaloniaCarouselShiftBug.csproj, change AvaloniaVersion to 11.0.11, restore NuGet packages, and then repeat the above steps. Observe no position changes.

Expected behavior

Behavior observed on 11.0.11 - window position remains intact.

Avalonia version

First appeared in 11.1.0-beta1; still in 11.1.0-rc2

OS

Windows

Additional context

No response

@kirb kirb added the bug label Jul 3, 2024
@maxkatz6 maxkatz6 added help-wanted A contribution from the community would be most welcome. os-windows labels Jul 8, 2024
@TomEdwardsEnscape
Copy link
Contributor

Probably caused by #14470.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help-wanted A contribution from the community would be most welcome. os-windows
Projects
None yet
Development

No branches or pull requests

3 participants