Window is the top-level control in Avalonia.
For more information and examples, see the
The default application templates create a single
MainWindow. You can
create additional windows from templates too:
- Right click the folder in Solution Explorer that you'd like to add the window to
- Select the
Add -> New Itemmenu item
- In the dialog that appears, navigate to the "Avalonia" section in the category tree
- Select "Window (Avalonia)"
- Enter your window name under "Name"
- Click the "Add" button
.NET Core CLI
Run this command replacing
[namespace] with the namespace you'd like to create the window in
[name] with the name of the window.
dotnet new avalonia.window -na [namespace] -n [name]
For more information see the .NET core templates repository.