- please use visaulstudio 2022 or greater or rider
- use .net7 runtime (version 7.0.100 or greater)(if you want to use others, please modify the version in the global.json)
- please setup workloads include Android, iOS, Wasm
- please open the long path support in Windows OS(https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry)
-
Add [AntDesign.Avalonia][nuget] nuget package to your project:
dotnet add package AntDesign.Avalonia
-
Edit
App.xaml
file:If you install 1.0.0-* version or higher, use this:
<Application ... xmlns:themes="clr-namespace:AntDesign;assembly=AntDesign" ...> <Application.Styles> <AntDesign:AntDesign Coloring="None" IsRounded="True"/> <AntDesign:AntDesignDataGrid/> <AntDesign:AntDesignColorPicker/> </Application.Styles> </Application>
you can change ui global colour with Coloring Property:
<AntDesign:AntDesign Coloring="None" />
you can change global CornerRadius with IsRounded Property:
<AntDesign:AntDesign IsRounded="True" />
- If you want to using AntDesign only , you can only add [AntDesign]
- If you want to using AntDesign DataGrid only , you can only add [AntDesign.DataGrid]
- If you want to using AntDesign ColorPicker only , you can only add [AntDesign.ColorPicker]
- If you want to using Custom Fonts-Alibaba PuHuiTi(°¢Àï°Í°ÍÆÕ»ÝÌå) only , you can only add [Avalonia.Toolkit]
You can always download demo executable to play around with LocalizationManager
https://github.com/MicroSugarDeveloperOrg/AntDesign.Avalonia
LocalizationManager.Avalonia Version | Avalonia Version |
---|---|
0.1.0-preview6.x | 11.0-preview6 |
0.1.0-preview7.x | 11.0-preview7 |
0.1.0-preview8.x | 11.0-preview8 |
0.1.0-rc1.x | 11.0-rc1.x |
NOTE
AntDesign.Avalonia is moving forward together with Avalonia preview versions now. So new feature/fixes are not backported to previous preview versions. If you need a feature/fix for outdated avalonia preview version, please raise an issue so we can do that for you.