avaloniauiavaloniamulti-window

Avalonia : Multiscreen - opening a window with negative x-value (on left monitor) fails to work


Situation : Avalonia 0.10.18, Windows 11, 3 (same) monitors, NET6.0.

I have a 'main' window on the middle screen and I use a second (floating) window for some common values (with 'main' as parent). I save the position of the second 'floating' window on closing and on 'OnOpened' I read the values and position the window accordingly. That works fine as long as the floating window was not on the left monitor (negative X-value)(so all X-positions on middle and right work fine).

Since this second window has the main window as parent, the X-value is thus negative and I presume that is to prevent windows from being out of the screen area.

A last fact, but I doubt that that has to do with it, is that I'm using windowless windows, but the custom made positioning works correct in all cases (even on the left monitor).

Since in absolute values my 'floating' window is not out of the screen area and I do not know if I'm perhaps using a wrong event or is this rather a bug ?


Solution

  • OK, Sorry, my bad. I had in an upper class window a rule set that if the left < 0, not to use that value at the startup of the window.

    So, it was a bug in my code and not in the Avalonia code !