Introducing Avalonia v11 version
The avalonia v11 version has been released, adding many new features, and the Avalonia extensions have also been upgraded simultaneously.
Main updates:
- Accessibility: Added support for various accessibility tools, improving the usability of the Avalonia application.
- Input Method Editor (IME) support: allows on-screen keyboard and input in all languages.
- Composite renderer: Provides more powerful, efficient and flexible graphics rendering capabilities.
- WebAssembly (WASM) support: Allows Avalonia applications to run in the browser, broadening platform support.
- iOS and Android support: Developers can build and run Avalonia apps on iOS and Android.
- Rich text support: Ability to fully render complex documents with support for adding annotations, hyperlinks, and other inline elements to the text.
- Smooth Virtualization: Redesign ItemsControl to improve control efficiency and user experience.
- Performance improvements: Improve application speed and efficiency.
- Add control themes, nested styles, and theme variations: Make it easier to build consistent and beautiful user interfaces.
- Bitmap Effects: Allows applying visual effects to bitmap images.
- 3D Transform: Allows the creation of stunning three-dimensional effects.
- Ahead compilation and pruning: Increase application speed and reduce application size.
- GPU interop: Improved rendering performance and visual effects.
For details, see:
https://github.com/AvaloniaUI/Avalonia/releases/tag/11.0.0
Official website:
https://www.avaloniaui.net/
Documentation:
Avalonia Documentation
The documentation has also been updated to version 11. The documentation currently supports Chinese (most of it is already in Chinese), and previous versions of the documentation can also be viewed.
Install
Add an extension, search for avalonia in the extension, and choose to install "Avalonia for Visual Studio 2022". The latest version is already 11.1. This package depends on "Avalonia Template Studio", and two extensions will eventually be installed.
After the download is completed, close all vs. Remember to close them all after saving, otherwise they will be forced to close during installation.
Modify is installed, and the two extensions are installed.
use
1.Create project
Select the Avalonia category. Version 11 has only one optional project template.
Modify the project name and location, then click Create
Then you will enter the Avalonia project creation window to select the platform and functions.
- Platform selection, select your target platform, Desktop, Web, Android, IOS, and finally generate the project. Multiple startup projects will be generated based on multiple platforms.
-
Choose the design pattern, which is the two MVVM frameworks, choose according to your needs
-
Select other features
Compilation binding, embedded support, etc., not used yet
Click Create to create (if the subsequent content does not need to be modified, you can create it directly in the first step)
2. Project structure
Multiple projects will be generated after creation
The main project is a class library "AvaloniaApp" which is a class library for common interfaces and codes. Then "AvaloniaApp.Android" and "AvaloniaApp.Desktop" are startup projects for different platforms. This generates different projects according to the selected platform.
The main development is carried out in the main project, which contains the interface files of the Views folder and the vm class of the ViewModels folder. This can be adjusted according to your own habits.