-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Describe the bug
I am new to AvaloniaUI and am struggling to understand the differences from WPF.
I am running VS 2022 version 17.14.20 and AvaloniaUI 11.10.7.0, recently downloaded from the VS Marketplace.
I am working on a simple Hello World desktop MVVM GUI application using AvaloniaUI, that was created using the MVVM template. I am targeting WSL. There are 3 annoying behaviors that I am seeing.
No errors are reported in the Output window.
-
When I open the existing project in VS the axaml file is displayed in a horizontal layout with the XML file on the left and the preview window on the right. This is despite the fact that previously the vertical layout was selected with the preview window above the xaml window. Also, the preview is always at 100%, even though it was previously displayed at 66.67%. It appears that the previously selected layout is not remembered.
-
The F4 Properties page is empty when I expect it to display either the alphabetical or categorized list of properties for the focused control.
-
Setting the main window's WindowStartupLocation to Manual and the Position to "100,100" has no effect. The application always starts at "0,0".
-
and 2) above occur regarddless of whether Windows or WSL are targeted. Whereas 3) only occurs when WSL is targeted. It is strange since X11 has a method XConfigureWindow that supports setting the window's X and Y position.
These seem like basic functionalities that should just work for a mature technology. If they are designed to work differently, an error should be reported back to the developer.
Not sure that I should spend any more time on this if a simple app with one View and 4 controls does not work!
Thanks.
Rick Burke
To Reproduce
-
Create an AvaloniaUI MVVM C# app from the installed template.
-
Open MainWindow.axaml.
-
Notice that the layout is horizontal and the previewer magnification is 100% .
-
Change to vertical layout and 50% magnification.
-
Save and close the solution
-
Open the solution.
-
Notice that the layout is horizontal and the magnification is 100%.
-
While viewing MainWindow.axaml from above, select the control and press F4 to display the Window properties.
-
Notice that no properties are displayed.
-
Edit MainWindow.axaml to set the WindowStartupLocation to Manual and the Position to "100, 100".
-
Build and run the application.
-
Notice that the Window appears at a location that is offset from the upper left of the screen. This is as expected
-
Change the dropdown in the toolbar to target WSL and re-run the program.
-
Notice that the app's window is at 0,0.
Throughout execution of these steps
Expected behavior
See the Steps to Reproduce section above
Avalonia version
11.10.7
OS
Windows
Additional context
building both for Windows 11 and WSL.