Semi.Avalonia/README.md

106 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2024-03-14 15:59:27 +08:00
# Semi Avalonia
2023-02-03 23:43:22 +08:00
[![Semi Avalonia](https://img.shields.io/nuget/v/Semi.Avalonia.svg?color=red&style=flat-square)](https://www.nuget.org/packages/Semi.Avalonia/)
[![Semi Avalonia](https://img.shields.io/nuget/dt/Semi.Avalonia.svg?style=flat-square)](https://www.nuget.org/packages/Semi.Avalonia/)
2024-03-14 15:59:27 +08:00
[中文](./README_CN.md)
Avalonia Theme inspired by Semi Design
2024-03-14 16:03:51 +08:00
If you are looking for more customized controls, Please try [Ursa](https://github.com/irihitech/Ursa.Avalonia)
2024-03-14 15:59:27 +08:00
![Light](./docs/demo.jpg)
## How to Use
### Installation
2023-02-03 23:43:22 +08:00
```bash
2024-01-27 15:58:24 +08:00
dotnet add package Semi.Avalonia --version 11.0.7
2023-02-03 23:43:22 +08:00
```
2024-03-14 15:59:27 +08:00
2023-02-03 23:43:22 +08:00
Include Semi Design Styles in application:
```xaml
<Application.Styles>
2023-02-13 12:12:03 +08:00
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
2023-02-03 23:43:22 +08:00
</Application.Styles>
```
2024-03-14 15:59:27 +08:00
That's all.
2023-02-03 23:43:22 +08:00
2024-03-20 23:24:17 +08:00
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
2024-03-14 15:59:27 +08:00
2023-02-13 12:12:03 +08:00
```bash
2024-01-27 15:58:24 +08:00
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7
dotnet add package Semi.Avalonia.DataGrid --version 11.0.7
dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7
2023-02-13 12:12:03 +08:00
```
2024-03-14 15:59:27 +08:00
2023-02-13 12:12:03 +08:00
```xaml
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
2023-08-30 11:33:21 +08:00
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
2023-02-13 12:12:03 +08:00
</Application.Styles>
```
2023-02-19 18:25:44 +08:00
2024-03-20 23:24:17 +08:00
If AOT publishing is required, you need to include the rd.xml file in your project:
```xml
<ItemGroup>
<RdXmlFile Include="rd.xml"/>
</ItemGroup>
```
The contents of the rd.xml file should be as follows:
```xml
<?xml version="1.0" encoding="utf-8"?>
<Directives>
<!--
This file is part of RdXmlLibrary project.
Visit https://github.com/kant2002/rdxmllibrary for latest version.
If you have modifications specific to this Nuget package,
please contribute back.
-->
<Application>
<Assembly Name="Avalonia.Markup.Xaml" Dynamic="Required All"/>
<Assembly Name="Semi.Avalonia" Dynamic="Required All"/>
<!-- If you don't use these, please don't include them.
<Assembly Name="Semi.Avalonia.DataGrid" Dynamic="Required All"/>
<Assembly Name="Semi.Avalonia.ColorPicker" Dynamic="Required All"/>
-->
</Application>
</Directives>
```
2023-02-19 18:25:44 +08:00
## Demo
You can always download demo executable to play around with Semi Avalonia Themes.
2024-03-14 15:59:27 +08:00
<https://github.com/irihitech/Semi.Avalonia/releases>
2023-02-19 18:25:44 +08:00
2023-02-03 23:43:22 +08:00
## Version compatibility
2023-03-22 12:58:23 +08:00
| Semi Design Version | Avalonia Version |
|:--------------------|:-----------------|
2024-03-20 23:24:17 +08:00
| 11.0.7 | >=11.0.7 |
2024-01-27 15:58:24 +08:00
| 11.0.1 | <=11.0.6 |
2023-03-27 11:38:35 +08:00
2023-02-03 23:43:22 +08:00
## TODO
2024-03-14 15:59:27 +08:00
2023-02-03 23:43:22 +08:00
* FocusAdorner
2022-12-13 15:20:56 +08:00
2023-03-17 20:37:23 +08:00
## Credits
[Semi Design](https://semi.design/)
[Avalonia](https://github.com/AvaloniaUI/Avalonia)
[FluentAvalonia](https://github.com/amwx/FluentAvalonia)
[Material Design Icons](https://pictogrammers.com/library/mdi/)
[CommunityToolKit](https://github.com/CommunityToolkit/dotnet)