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
Describe the bug
In the AvaloniaCoreRTDemo application, we have a switch for Simple and Fluent themes. To swap themes, we need to close the application's windows and reopen them. This is simply since the application only has one main window and a modal, that disables the theme switch.
When closing the previous main window and opening the new one, we want to maintain the window state, including size, position, and content. However, when assigning the position, we observe different behavior across platforms.
To Reproduce
Create an instance of custom window class (the windows must contain a native menu) and display it. This will be the old window instance.
Move the old window instance on the desktop to a random position.
Create a second instance of the same window class. This will be the new window instance.
Set the position of the new window instance to the position of the old window instance.
Hide the old window instance and show the new window instance.
Close the old window instance.
Expected behavior
The new window instance must be displayed exactly at the old window instance's position.
OS: Ubuntu 22.04, Windows 10, macOS Montery
Version: 11.0.0 Preview 8
Workaround
To ensure convergence in teobugslayer/AvaloniaCoreRTDemo#8 a trial and error solution was implemented for the following 3 platforms. The most concerning issue is the handling on Windows, as using reflection in the AOT context implies using rd.xml, which is not easy.
Describe the bug
In the AvaloniaCoreRTDemo application, we have a switch for Simple and Fluent themes. To swap themes, we need to close the application's windows and reopen them. This is simply since the application only has one main window and a modal, that disables the theme switch.
When closing the previous main window and opening the new one, we want to maintain the window state, including size, position, and content. However, when assigning the position, we observe different behavior across platforms.
To Reproduce
Expected behavior
The new window instance must be displayed exactly at the old window instance's position.
Workaround
To ensure convergence in teobugslayer/AvaloniaCoreRTDemo#8 a trial and error solution was implemented for the following 3 platforms. The most concerning issue is the handling on Windows, as using reflection in the AOT context implies using rd.xml, which is not easy.
Linux + MATE:
Windows:
macOS:
The text was updated successfully, but these errors were encountered: