From ad7bcfc520bff66c88a26d50284b5a52a8f776df Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:57:21 +0800 Subject: [PATCH] misc: README & Overview page. --- README.md | 40 +++---------- README_CN.md | 42 +++----------- demo/Semi.Avalonia.Demo.Desktop/app.manifest | 2 +- demo/Semi.Avalonia.Demo/App.axaml | 2 +- demo/Semi.Avalonia.Demo/App.axaml.cs | 4 ++ .../Pages/Overview.axaml.cs | 58 ++++++++++--------- .../Semi.Avalonia.Demo.csproj | 2 +- 7 files changed, 54 insertions(+), 96 deletions(-) diff --git a/README.md b/README.md index 8bf0b1a..624f7e1 100644 --- a/README.md +++ b/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) ![Light](./docs/demo.jpg) @@ -23,7 +27,9 @@ Include Semi Design Styles in application: ```xaml - + + + ``` @@ -45,36 +51,6 @@ dotnet add package Semi.Avalonia.TreeDataGrid ``` -If AOT publishing is required, you need to include the rd.xml file in your project: - -```xml - - - -``` - -The contents of the rd.xml file should be as follows: - -```xml - - - - - - - - - -``` - ## 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 | diff --git a/README_CN.md b/README_CN.md index 62c637d..188b583 100644 --- a/README_CN.md +++ b/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) ![Light](./docs/demo.jpg) @@ -23,13 +27,15 @@ dotnet add package Semi.Avalonia ```xaml - + + + ``` 这样就可以了。 -ColorPicker, DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。 +ColorPicker、DataGrid 和 TreeDataGrid 的样式单独分发,如果需要请安装并引用。 ```bash dotnet add package Semi.Avalonia.ColorPicker @@ -45,36 +51,6 @@ dotnet add package Semi.Avalonia.TreeDataGrid ``` -如果需要进行 AOT 发布,则需要在项目中包含 rd.xml 文件: - -```xml - - - -``` - -rd.xml 文件的内容如下: - -```xml - - - - - - - - - -``` - ## 示例 您可以从 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 | diff --git a/demo/Semi.Avalonia.Demo.Desktop/app.manifest b/demo/Semi.Avalonia.Demo.Desktop/app.manifest index 428fcd2..1b4e166 100644 --- a/demo/Semi.Avalonia.Demo.Desktop/app.manifest +++ b/demo/Semi.Avalonia.Demo.Desktop/app.manifest @@ -1,7 +1,7 @@  diff --git a/demo/Semi.Avalonia.Demo/App.axaml b/demo/Semi.Avalonia.Demo/App.axaml index 7158df3..1e0383a 100644 --- a/demo/Semi.Avalonia.Demo/App.axaml +++ b/demo/Semi.Avalonia.Demo/App.axaml @@ -6,7 +6,7 @@ - + diff --git a/demo/Semi.Avalonia.Demo/App.axaml.cs b/demo/Semi.Avalonia.Demo/App.axaml.cs index 399c279..b4482be 100644 --- a/demo/Semi.Avalonia.Demo/App.axaml.cs +++ b/demo/Semi.Avalonia.Demo/App.axaml.cs @@ -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: diff --git a/demo/Semi.Avalonia.Demo/Pages/Overview.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/Overview.axaml.cs index be668a8..163ee18 100644 --- a/demo/Semi.Avalonia.Demo/Pages/Overview.axaml.cs +++ b/demo/Semi.Avalonia.Demo/Pages/Overview.axaml.cs @@ -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; } = """ - - - -"""; + public string MainStyle { get; set; } = + """ + + + + + + """; - 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; } = """ - - - -"""; + public string ColorPickerStyle { get; set; } = + """ + + + + """; - 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; } = """ - - - -"""; + public string DataGridStyle { get; set; } = + """ + + + + """; - 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; } = """ - - - -"""; + public string TreeDataGridStyle { get; set; } = + """ + + + + """; } \ No newline at end of file diff --git a/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj b/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj index 757b062..cb9a679 100644 --- a/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj +++ b/demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj @@ -14,7 +14,7 @@ - +