AvaloniaUI/AvaloniaVS

Mouse is not properly aligned in VS designer view

amSnoop opened this issue · 4 comments

Describe the bug
When using VS to preview chances to axaml files, the mouse pointer that Avalonia sees does not align with the actual position of the mouse pointer that Windows sees. The designer does recognize properly when the mouse is not over the window at all, which in my video example below means that I cannot click the Import button no matter how hard I try, nor can I use scroll bars.

To Reproduce
Steps to reproduce the behavior:

  1. Create any kind of window with Avalonia (best noticed when there are elements that react to being clicked or moused-over)
  2. Open the axaml file for any window, letting VS automatically bring up the designer view
  3. Observe that the mouse is not aligned.

This happens even when I use the extension to create a new Avalonia app from scratch

Expected behavior
The designer would properly portray the position of the mouse

Video Example
https://user-images.githubusercontent.com/49213176/217029090-3933eec4-e0f4-483d-a208-7f9f4e0049ba.mp4

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 0.10.18 and 0.10.15

Additional context
Visual Studio 22

amwx commented

I think I remember something like this a while ago, but its been some time since I've noticed it so I think this has been fixed somewhere in all the 11.0 stuff.

I attempted to update to 11 preview 5, but I had a lot of trouble and am not experienced enough to figure it out on my own (I could not find any published information about the issue I was having, which was just getting the basic app template to build after migrating)

Is the only fix for this issue really to update? It seems weird that at least 4 versions (0.10.15-18) would all have this same bug without me being able to find any information about it online. Is there any other kind of fix or workaround?

Edit: I finally got Solitaire from https://github.com/AvaloniaUI/Solitaire and loaded its main window in the designer. The issue was not corrected for me. It still does not align the mouse pointer with the actual position of the mouse.

amwx commented

Is your computer/monitor using a non 100% display scaling? At 100% all is fine, but if I change the monitor's scaling to anything else the pointer is offset in the previewer.

Oh my god.......

I use 125% because I have rather small 2k monitors. I've never had an issue with in other programs but that does indeed fix the issue for me. That really really sucks lmfao. Thanks for the help.