misc: README & Overview page.
This commit is contained in:
parent
b930a2dcf1
commit
ad7bcfc520
40
README.md
40
README.md
@ -7,6 +7,10 @@
|
||||
|
||||
Avalonia Theme inspired by Semi Design
|
||||
|
||||
Semi.Avalonia can be previewed in the browser [here](https://irihitech.github.io/Semi.Avalonia/)
|
||||
|
||||
If you are looking for more detailed documentation, Please visit [Semi Documentation](https://docs.irihi.tech/semi/)
|
||||
|
||||
If you are looking for more customized controls, Please try [Ursa](https://github.com/irihitech/Ursa.Avalonia)
|
||||
|
||||

|
||||
@ -23,7 +27,9 @@ Include Semi Design Styles in application:
|
||||
|
||||
```xaml
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||
<!-- You can still reference in old way. -->
|
||||
<!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
|
||||
<semi:SemiTheme Locale="zh-cn" />
|
||||
</Application.Styles>
|
||||
```
|
||||
|
||||
@ -45,36 +51,6 @@ dotnet add package Semi.Avalonia.TreeDataGrid
|
||||
</Application.Styles>
|
||||
```
|
||||
|
||||
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>
|
||||
```
|
||||
|
||||
## Demo
|
||||
|
||||
You can always download demo executable to play around with Semi Avalonia Themes.
|
||||
@ -90,7 +66,7 @@ We offer limited free community support for Semi Avalonia and Ursa. If you have
|
||||
|
||||
| Semi Design Version | Avalonia Version |
|
||||
|:--------------------|:-----------------|
|
||||
| 11.1.0-rc | >=11.1.0-rc |
|
||||
| 11.1.0 | >=11.1.0 |
|
||||
| 11.0.7 | >=11.0.7 |
|
||||
| 11.0.1 | <=11.0.6 |
|
||||
|
||||
|
42
README_CN.md
42
README_CN.md
@ -7,6 +7,10 @@
|
||||
|
||||
Avalonia UI 控件主题,灵感来自 Semi Design
|
||||
|
||||
Semi.Avalonia 现在可以在浏览器上 [查看效果](https://irihitech.github.io/Semi.Avalonia/)
|
||||
|
||||
如果您希望查看更详细的文档,请浏览 [Semi 文档](https://docs.irihi.tech/semi/)
|
||||
|
||||
如果您希望使用更多的拓展控件,欢迎尝试 [Ursa](https://github.com/irihitech/Ursa.Avalonia)
|
||||
|
||||

|
||||
@ -23,13 +27,15 @@ dotnet add package Semi.Avalonia
|
||||
|
||||
```xaml
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||
<!-- 您仍然可以使用旧版方式引用 -->
|
||||
<!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
|
||||
<semi:SemiTheme Locale="zh-cn" />
|
||||
</Application.Styles>
|
||||
```
|
||||
|
||||
这样就可以了。
|
||||
|
||||
ColorPicker, DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。
|
||||
ColorPicker、DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。
|
||||
|
||||
```bash
|
||||
dotnet add package Semi.Avalonia.ColorPicker
|
||||
@ -45,36 +51,6 @@ dotnet add package Semi.Avalonia.TreeDataGrid
|
||||
</Application.Styles>
|
||||
```
|
||||
|
||||
如果需要进行 AOT 发布,则需要在项目中包含 rd.xml 文件:
|
||||
|
||||
```xml
|
||||
<ItemGroup>
|
||||
<RdXmlFile Include="rd.xml"/>
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
rd.xml 文件的内容如下:
|
||||
|
||||
```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>
|
||||
```
|
||||
|
||||
## 示例
|
||||
|
||||
您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。
|
||||
@ -92,7 +68,7 @@ rd.xml 文件的内容如下:
|
||||
|
||||
| Semi Design Version | Avalonia Version |
|
||||
|:--------------------|:-----------------|
|
||||
| 11.1.0-rc | >=11.1.0-rc |
|
||||
| 11.1.0 | >=11.1.0 |
|
||||
| 11.0.7 | >=11.0.7 |
|
||||
| 11.0.1 | <=11.0.6 |
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<!-- This manifest is used on Windows only.
|
||||
Don't remove it as it might cause problems with window transparency and embeded controls.
|
||||
Don't remove it as it might cause problems with window transparency and embedded controls.
|
||||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||
<assemblyIdentity version="1.0.0.0" name="Semi.Avalonia.Demo.Desktop"/>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<Application.Styles>
|
||||
<!-- You can still reference in old way. -->
|
||||
<!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
|
||||
<semi:SemiTheme Locale="zh-CN" />
|
||||
<semi:SemiTheme Locale="zh-cn" />
|
||||
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||
</Application.Styles>
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Data.Core.Plugins;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Semi.Avalonia.Demo.Views;
|
||||
|
||||
@ -17,6 +18,9 @@ public partial class App : Application
|
||||
switch (ApplicationLifetime)
|
||||
{
|
||||
case IClassicDesktopStyleApplicationLifetime desktop:
|
||||
// Line below is needed to remove Avalonia data validation.
|
||||
// Without this line you will get duplicate validations from both Avalonia and CT
|
||||
BindingPlugins.DataValidators.RemoveAt(0);
|
||||
desktop.MainWindow = new MainWindow();
|
||||
break;
|
||||
case ISingleViewApplicationLifetime singleView:
|
||||
|
@ -1,8 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Styling;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
@ -13,35 +9,41 @@ public partial class Overview : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.0.7";
|
||||
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.1.0";
|
||||
|
||||
public string MainStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
public string MainStyle { get; set; } =
|
||||
"""
|
||||
<Application.Styles>
|
||||
<!-- You can still reference in old way. -->
|
||||
<!-- <StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" /> -->
|
||||
<semi:SemiTheme Locale="zh-cn" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.0.7";
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.1.0";
|
||||
|
||||
public string ColorPickerStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
public string ColorPickerStyle { get; set; } =
|
||||
"""
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.0.7";
|
||||
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.1.0";
|
||||
|
||||
public string DataGridStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
public string DataGridStyle { get; set; } =
|
||||
"""
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.7";
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.1.0";
|
||||
|
||||
public string TreeDataGridStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
public string TreeDataGridStyle { get; set; } =
|
||||
"""
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersion)" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user