Merge branch 'develop' into feature/timeline
52
AtomUI.sln
@ -1,31 +1,34 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Theme", "src\AtomUI.Theme\AtomUI.Theme.csproj", "{87085491-3C99-4C8F-8FA6-F179B9569CE8}"
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.11.35125.118
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Theme", "src\AtomUI.Theme\AtomUI.Theme.csproj", "{87085491-3C99-4C8F-8FA6-F179B9569CE8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Base", "src\AtomUI.Base\AtomUI.Base.csproj", "{8FFEB15F-7E48-4AF4-B708-8E96A68CF2D9}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Base", "src\AtomUI.Base\AtomUI.Base.csproj", "{8FFEB15F-7E48-4AF4-B708-8E96A68CF2D9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Icon", "src\AtomUI.Icon\AtomUI.Icon.csproj", "{B2A7349B-4B38-45CB-8D22-3E06D1E3650F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Icon", "src\AtomUI.Icon\AtomUI.Icon.csproj", "{B2A7349B-4B38-45CB-8D22-3E06D1E3650F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Icon.Generator", "src\AtomUI.Icon.Generator\AtomUI.Icon.Generator.csproj", "{954FB7F2-7706-4E2B-86D1-624F66C1EFF0}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Icon.Generator", "src\AtomUI.Icon.Generator\AtomUI.Icon.Generator.csproj", "{954FB7F2-7706-4E2B-86D1-624F66C1EFF0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Icon.AntDesign", "src\AtomUI.Icon.AntDesign\AtomUI.Icon.AntDesign.csproj", "{021AE0B0-B148-4925-9C22-EBD5A7B43E95}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Icon.AntDesign", "src\AtomUI.Icon.AntDesign\AtomUI.Icon.AntDesign.csproj", "{021AE0B0-B148-4925-9C22-EBD5A7B43E95}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Generator", "src\AtomUI.Generator\AtomUI.Generator.csproj", "{30910056-F8F6-4429-B25E-722C57440210}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Generator", "src\AtomUI.Generator\AtomUI.Generator.csproj", "{30910056-F8F6-4429-B25E-722C57440210}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Demo.Desktop", "Samples\AtomUI.Demo.Desktop\AtomUI.Demo.Desktop.csproj", "{59931F42-8DD8-4DFC-9060-563841F39669}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Demo.Desktop", "Samples\AtomUI.Demo.Desktop\AtomUI.Demo.Desktop.csproj", "{59931F42-8DD8-4DFC-9060-563841F39669}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.TestBase", "tests\AtomUI.TestBase\AtomUI.TestBase.csproj", "{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.TestBase", "tests\AtomUI.TestBase\AtomUI.TestBase.csproj", "{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Base.Tests", "tests\AtomUI.Base.Tests\AtomUI.Base.Tests.csproj", "{E41D737A-5CF0-4B33-9F51-2C1B1541659C}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Base.Tests", "tests\AtomUI.Base.Tests\AtomUI.Base.Tests.csproj", "{E41D737A-5CF0-4B33-9F51-2C1B1541659C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI.Controls", "src\AtomUI.Controls\AtomUI.Controls.csproj", "{A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI.Controls", "src\AtomUI.Controls\AtomUI.Controls.csproj", "{A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{5EB2524C-30A5-4031-B424-4510E36C753E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
Directory.Build.targets = Directory.Build.targets
|
||||
build\Common.props = build\Common.props
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Build.targets = Directory.Build.targets
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
build\Internal.Using.props = build\Internal.Using.props
|
||||
build\Nuget.props = build\Nuget.props
|
||||
build\Output.App.props = build\Output.App.props
|
||||
@ -38,7 +41,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{279BC2C9
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Generators", "Generators", "{B4C46C3E-0CCC-4861-95B6-CA08D501A46F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtomUI", "packages\AtomUI\AtomUI.csproj", "{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtomUI", "packages\AtomUI\AtomUI.csproj", "{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{021AE0B0-B148-4925-9C22-EBD5A7B43E95} = {021AE0B0-B148-4925-9C22-EBD5A7B43E95}
|
||||
{87085491-3C99-4C8F-8FA6-F179B9569CE8} = {87085491-3C99-4C8F-8FA6-F179B9569CE8}
|
||||
{8FFEB15F-7E48-4AF4-B708-8E96A68CF2D9} = {8FFEB15F-7E48-4AF4-B708-8E96A68CF2D9}
|
||||
{A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D} = {A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}
|
||||
{B2A7349B-4B38-45CB-8D22-3E06D1E3650F} = {B2A7349B-4B38-45CB-8D22-3E06D1E3650F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -73,15 +83,12 @@ Global
|
||||
{59931F42-8DD8-4DFC-9060-563841F39669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{59931F42-8DD8-4DFC-9060-563841F39669}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{59931F42-8DD8-4DFC-9060-563841F39669}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{59931F42-8DD8-4DFC-9060-563841F39669}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E41D737A-5CF0-4B33-9F51-2C1B1541659C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E41D737A-5CF0-4B33-9F51-2C1B1541659C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E41D737A-5CF0-4B33-9F51-2C1B1541659C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E41D737A-5CF0-4B33-9F51-2C1B1541659C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A07CB66E-7A5F-4C44-BB16-02A0A99D6C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@ -89,13 +96,18 @@ Global
|
||||
{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{89A98C0D-B6F7-48CD-91C4-79FC0FED3615}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{E41D737A-5CF0-4B33-9F51-2C1B1541659C} = {279BC2C9-A818-4D6C-9274-678649932057}
|
||||
{59931F42-8DD8-4DFC-9060-563841F39669} = {279BC2C9-A818-4D6C-9274-678649932057}
|
||||
{954FB7F2-7706-4E2B-86D1-624F66C1EFF0} = {B4C46C3E-0CCC-4861-95B6-CA08D501A46F}
|
||||
{30910056-F8F6-4429-B25E-722C57440210} = {B4C46C3E-0CCC-4861-95B6-CA08D501A46F}
|
||||
{59931F42-8DD8-4DFC-9060-563841F39669} = {279BC2C9-A818-4D6C-9274-678649932057}
|
||||
{EADEF2AC-B7E5-436A-8B39-8BBECF8706AB} = {279BC2C9-A818-4D6C-9274-678649932057}
|
||||
{E41D737A-5CF0-4B33-9F51-2C1B1541659C} = {279BC2C9-A818-4D6C-9274-678649932057}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {056F1B83-F604-4F7D-A255-0B40FB31A8F6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -23,4 +23,5 @@
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002EMemberReordering_002EMigrations_002ECSharpFileLayoutPatternRemoveIsAttributeUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
@ -1,5 +1,4 @@
|
||||
<Project>
|
||||
<Import Project="$(MSBuildThisFileDirectory)\build\Common.props"/>
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
@ -12,6 +11,8 @@
|
||||
<PackageVersion Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
|
||||
<PackageVersion Include="Avalonia.Win32" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
|
||||
|
||||
<PackageVersion Include="AtomUI" Version="$(NugetPackageVersion)"/>
|
||||
|
||||
<!-- TODO 版本是否跟随 AvaloniaVersionThatLibrariesUsed?-->
|
||||
<PackageVersion Include="Avalonia.Svg" Version="11.1.0"/>
|
||||
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
|
||||
|
142
README.md
@ -33,107 +33,69 @@
|
||||
|
||||
Documentation Language: [English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
||||
<img src="./docs/images/Release.jpg"/>
|
||||
|
||||
#### Introduce
|
||||
|
||||
AtomUI is an implementation of Ant Design based on .NET technology, dedicated to bringing the excellent and efficient design language and experience of Ant Design to the Avalonia/.NET cross-platform desktop software development field.
|
||||
|
||||
Welcome to communicate and give suggestions to AtomUI, thank you for giving the project a Star.
|
||||
|
||||
<img src="./docs/images/Gallery.png"/>
|
||||
|
||||
#### Control library completion
|
||||
#### Features
|
||||
|
||||
##### General
|
||||
| Control Name | Status |
|
||||
|:-------------|:-----------|
|
||||
| Button | Completed ✅|
|
||||
| PathIcon | Completed ✅|
|
||||
| SpiltButton | Completed ✅|
|
||||
|
||||
##### Navigation
|
||||
| Control Name | Status |
|
||||
|:-------------|:------------|
|
||||
| Breadcrumb | TODO |
|
||||
| Dropdown | Completed ✅ |
|
||||
| Menu | Completed ✅ |
|
||||
| Pagination | TODO |
|
||||
| Steps | TODO |
|
||||
|
||||
##### Data Entry
|
||||
| Control Name | Status |
|
||||
|:----------------|:---------------|
|
||||
| AutoComplete | TODO |
|
||||
| Cascader | TODO |
|
||||
| Checkbox | Completed ✅ |
|
||||
| ColorPicker | Developing 💪 |
|
||||
| DatePicker | Developing 💪 |
|
||||
| Form | TODO |
|
||||
| Input | Completed ✅ |
|
||||
| NumberUpDown | Completed ✅ |
|
||||
| ButtonSpinner | Completed ✅ |
|
||||
| Mentions | TODO |
|
||||
| Radio | Completed ✅ |
|
||||
| OptionButtonBox | Completed ✅ |
|
||||
| Rate | TODO |
|
||||
| Select | TODO |
|
||||
| Slider | Completed ✅ |
|
||||
| Switch | Completed ✅ |
|
||||
| TimePicker | Completed ✅ |
|
||||
| Transfer | TODO |
|
||||
| Upload | Need Review 🤔 |
|
||||
|
||||
##### Data Display
|
||||
| Control Name | Status |
|
||||
|:---------------|:---------------|
|
||||
| Avatar | TODO |
|
||||
| Badge | Completed ✅ |
|
||||
| Calendar | Developing 💪|
|
||||
| Card | TODO |
|
||||
| GroupBox | Completed ✅ |
|
||||
| Carousel | Developing 💪 |
|
||||
| Collapse | Completed ✅ |
|
||||
| Expander | Completed ✅ |
|
||||
| Descriptions | TODO |
|
||||
| EmptyIndicator | Completed ✅ |
|
||||
| Image | TODO |
|
||||
| ListBox | Completed ✅ |
|
||||
| Popover | Completed ✅ |
|
||||
| QRCode | TODO |
|
||||
| Segmented | Completed ✅ |
|
||||
| Statistic | TODO |
|
||||
| Table | TODO |
|
||||
| TabControl | Completed ✅ |
|
||||
| Tag | Completed ✅ |
|
||||
| Timeline | Developing 💪 |
|
||||
| Tooltip | Completed ✅ |
|
||||
| Tour | TODO |
|
||||
| Tree | Completed ✅ |
|
||||
|
||||
##### Feedback
|
||||
| Control Name | Status |
|
||||
|:-------------------|:-----------|
|
||||
| Alert | Completed ✅ |
|
||||
| Drawer | Completed ✅ |
|
||||
| Message | Completed ✅ |
|
||||
| Modal | Developing 💪 |
|
||||
| Notification | Completed ✅ |
|
||||
| Popconfirm | Completed ✅ |
|
||||
| ProgressBar | Completed ✅ |
|
||||
| Result | Need Review 🤔 |
|
||||
| Skeleton | TODO |
|
||||
| LoadingIndicator | Completed ✅ |
|
||||
| Watermark | Completed ✅|
|
||||
- Enterprise-class UI designed from Ant Design system for cross platform desktop applications.
|
||||
- A set of high-quality Avalonia Controls out of the box.
|
||||
- Use .NET development to achieve one-stop writing, seamless compilation on mainstream operating system platforms and render a consistent UI experience.
|
||||
- Based on Avalonia's powerful style system, Ant Design's theme customization capabilities are fully implemented.
|
||||
|
||||
#### Some screenshots of the running effect
|
||||
|
||||
#### Button Controls
|
||||
|
||||
![Button](docs/images/controls/ButtonControl.png)
|
||||
|
||||
#### Progress bar control
|
||||
![Progress](docs/images/controls/ProgressBarControl.png)
|
||||
|
||||
#### Slider control
|
||||
![Slider](docs/images/controls/SliderControl.png)
|
||||
<table border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Button.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Badge.png" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/DatePicker.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/LineEdit.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Menu.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Notification.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/PopupConfirm.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/ProgressBar.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/RadioButton.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/TreeView.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div style="height:50px"></div>
|
||||
|
||||
|
159
README.zh-CN.md
@ -33,16 +33,21 @@
|
||||
|
||||
文档语言: [English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
||||
<img src="./docs/images/Release.jpg"/>
|
||||
|
||||
#### 介绍
|
||||
|
||||
AtomUI 是基于 .NET 技术的 Ant Design 实现,致力于将 Ant Design 优秀而高效的设计语言和体验带入 Avalonia/.NET 跨平台桌面软件开发领域。
|
||||
欢迎与 AtomUI 进行交流并提出建议,感谢您为该项目点赞。
|
||||
|
||||
#### 感谢 Gitee 对 AtomUI 的认可
|
||||
<img src="./docs/images/Gallery.png"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="./docs/images/GVP.png" width="600"/>
|
||||
</p>
|
||||
#### 特性
|
||||
|
||||
- 实现 Ant Design 提炼自企业级中后台产品的交互语言和视觉风格。
|
||||
- 开箱即用的高质量 Avalonia 组件。
|
||||
- 使用 .NET 开发,实现一处编写,无缝在主流操作系统平台编译并且渲染出一致的 UI 体验。
|
||||
- 基于 Avalonia 强大的风格系统,完整实现了 Ant Design 的主题定制能力。
|
||||
|
||||
#### 运行环境
|
||||
|
||||
@ -50,6 +55,12 @@ AtomUI 是基于 .NET 技术的 Ant Design 实现,致力于将 Ant Design 优
|
||||
Avalonia 11.1.1 及其以上<br>
|
||||
PS: AtomUI 目前仅在 Windows 11 平台测试<br>
|
||||
|
||||
#### 感谢 Gitee 对 AtomUI 的认可
|
||||
|
||||
<p align="center">
|
||||
<img src="./docs/images/GVP.png" width="600"/>
|
||||
</p>
|
||||
|
||||
#### 中文社区
|
||||
目前我们暂时只创建 QQ 和微信开发者群的交流方式,下面是二维码,有兴趣的同学可以扫码加入:
|
||||
|
||||
@ -64,106 +75,56 @@ PS: AtomUI 目前仅在 Windows 11 平台测试<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<table>
|
||||
</table>
|
||||
|
||||
> PS:扫码请注明来意,比如:学习`AtomUI`或者`Avalonia`爱好者
|
||||
|
||||
#### 当前完成度
|
||||
##### (通用) General
|
||||
| Control Name | Status |
|
||||
|:-------------|:-------|
|
||||
| Button | 已完成 ✅ |
|
||||
| PathIcon | 已完成 ✅ |
|
||||
| SpiltButton | 已完成 ✅ |
|
||||
|
||||
##### (导航)Navigation
|
||||
| 控件名 | 完成情况 |
|
||||
|:---------------|:-------|
|
||||
| Breadcrumb 面包屑 | 未完成 |
|
||||
| Dropdown 下拉菜单 | 已完成 ✅ |
|
||||
| Menu 导航菜单 | 已完成 ✅ |
|
||||
| Pagination 分页 | 进行中 💪 |
|
||||
| Steps 步骤条 | 未完成 |
|
||||
|
||||
##### (数据录入)Data Entry
|
||||
| 控件名 | 完成情况 |
|
||||
|:---------------------|:-------|
|
||||
| AutoComplete 自动完成 | 未完成 |
|
||||
| ComboBox 下拉选择 | 进行中 💪 |
|
||||
| Cascader 级联选择 | 未完成 |
|
||||
| Checkbox 多选框 | 已完成 ✅ |
|
||||
| ColorPicker 颜色选择器 | 进行中 💪 |
|
||||
| DatePicker 日期选择框 | 进行中 💪 |
|
||||
| Form 表单 | 未完成 |
|
||||
| Input 输入框 | 已完成 ✅ |
|
||||
| NumberUpDown 数字输入框 | 已完成 ✅ |
|
||||
| ButtonSpinner 按钮切换控件 | 已完成 ✅ |
|
||||
| Mentions 提及 | 未完成 |
|
||||
| Radio 单选框 | 已完成 ✅ |
|
||||
| OptionButtonBox 单选组 | 已完成 ✅ |
|
||||
| Rate 评分 | 未完成 |
|
||||
| Select 选择器 | 进行中 💪 |
|
||||
| Slider 滑动输入条 | 已完成 ✅ |
|
||||
| Switch 开关 | 已完成 ✅ |
|
||||
| TimePicker 时间选择框 | 已完成 ✅ |
|
||||
| Transfer 穿梭框 | 未完成 |
|
||||
| Upload 上传 | 需评估 🤔 |
|
||||
|
||||
##### (数据展示)Data Display
|
||||
| 控件名 | 完成情况 |
|
||||
|:-----------------------|:-------|
|
||||
| Avatar 头像 | 未完成 |
|
||||
| Badge 徽标数 | 已完成 ✅ |
|
||||
| Calendar 日历 | 进行中 💪 |
|
||||
| Card 卡片 | 未完成 |
|
||||
| GroupBox 控件 | 已完成 ✅ |
|
||||
| Carousel 走马灯 | 进行中 💪 |
|
||||
| Collapse 折叠面板 | 已完成 ✅ |
|
||||
| Expander 折叠面板 | 已完成 ✅ |
|
||||
| Descriptions 描述列表 | 未完成 |
|
||||
| EmptyIndicator 空状态 | 已完成 ✅ |
|
||||
| PathIcon 图标 | 已完成 ✅ |
|
||||
| Image 图片 | 未完成 |
|
||||
| ListBox 列表 | 已完成 ✅ |
|
||||
| Popover 气泡卡片 | 已完成 ✅ |
|
||||
| QRCode 二维码 | 未完成 |
|
||||
| Segmented 分段控制器 | 已完成 ✅ |
|
||||
| Statistic 统计数值 | 未完成 |
|
||||
| Table 表格 | 未完成 |
|
||||
| TabControl 标签页 | 已完成 ✅ |
|
||||
| Tag 标签 | 已完成 ✅ |
|
||||
| MarqueeLabel 跑马灯 Label | 已完成 ✅ |
|
||||
| Timeline 时间轴 | 进行中 💪 |
|
||||
| Tooltip 文字提示 | 已完成 ✅ |
|
||||
| Tour 漫游式引导 | 未完成 |
|
||||
| Tree 树形控件 | 已完成 ✅ |
|
||||
|
||||
##### (反馈)Feedback
|
||||
| 控件名 | 完成情况 |
|
||||
|:---------------------|:-------|
|
||||
| Alert 警告提示 | 已完成 ✅ |
|
||||
| Drawer 抽屉 | 已完成 ✅ |
|
||||
| Message 全局提示 | 已完成 ✅ |
|
||||
| Modal 对话框 | 进行中 💪 |
|
||||
| Notification 通知提醒框 | 已完成 ✅ |
|
||||
| Popconfirm 气泡确认框 | 已完成 ✅ |
|
||||
| ProgressBar 进度条 | 已完成 ✅ |
|
||||
| Result 结果 | 需评估 🤔 |
|
||||
| Skeleton 骨架屏 | 未完成 |
|
||||
| LoadingIndicator 加载中 | 已完成 ✅ |
|
||||
| Watermark 水印 | 已完成 ✅ |
|
||||
|
||||
#### 运行效果部分截图
|
||||
|
||||
#### 按钮控件
|
||||
|
||||
![按钮控件](docs/images/controls/ButtonControl.png)
|
||||
|
||||
#### 进度条控件
|
||||
![进度条控件](docs/images/controls/ProgressBarControl.png)
|
||||
|
||||
#### Slider 控件
|
||||
![Slider 控件](docs/images/controls/SliderControl.png)
|
||||
<table border="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Button.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Badge.png" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/DatePicker.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/LineEdit.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Menu.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/Notification.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/PopupConfirm.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/ProgressBar.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/RadioButton.png"/>
|
||||
</td>
|
||||
<td align="center" valign="middle" style="padding: 2px">
|
||||
<img src="./docs/images/controls/TreeView.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div style="height:50px"></div>
|
||||
|
||||
|
@ -1,9 +1,13 @@
|
||||
%~dp0
|
||||
|
||||
rd/s/q ..\_output\
|
||||
rd/s/q ../_output/
|
||||
|
||||
cd ..\
|
||||
cd ../
|
||||
|
||||
dotnet msbuild .\AtomUI.sln /p:Configuration=Release
|
||||
dotnet msbuild ./AtomUI.sln /p:Configuration=Release
|
||||
|
||||
cd packages/AtomUI/
|
||||
|
||||
dotnet msbuild ./AtomUI.csproj /p:Configuration=Release
|
||||
|
||||
pause
|
@ -1,9 +0,0 @@
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)/../src/AtomUI.Base/AtomUI.Base.csproj" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)/../src/AtomUI.Theme/AtomUI.Theme.csproj" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)/../src/AtomUI.Controls/AtomUI.Controls.csproj" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)/../src/AtomUI.Icon/AtomUI.Icon.csproj" />
|
||||
<ProjectReference Include="$(MSBuildThisFileDirectory)/../src/AtomUI.Icon.AntDesign/AtomUI.Icon.AntDesign.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -3,8 +3,8 @@
|
||||
|
||||
<NoWarn>$(NoWarn);CS7035</NoWarn>
|
||||
|
||||
<AvaloniaVersionThatLibrariesUsed>11.1.2</AvaloniaVersionThatLibrariesUsed>
|
||||
<AvaloniaVersionThatSampleUsed>11.1.2</AvaloniaVersionThatSampleUsed>
|
||||
<AvaloniaVersionThatLibrariesUsed>11.1.3</AvaloniaVersionThatLibrariesUsed>
|
||||
<AvaloniaVersionThatSampleUsed>11.1.3</AvaloniaVersionThatSampleUsed>
|
||||
<LibVersion>0.0.1</LibVersion>
|
||||
<NugetPackageVersion>$(LibVersion)-local.1</NugetPackageVersion>
|
||||
<NugetPackageVersion>$(LibVersion)-preview.1</NugetPackageVersion>
|
||||
|
BIN
docs/images/Gallery.png
Normal file
After Width: | Height: | Size: 894 KiB |
BIN
docs/images/Release.jpg
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
docs/images/controls/Badge.png
Normal file
After Width: | Height: | Size: 383 KiB |
BIN
docs/images/controls/Button.png
Normal file
After Width: | Height: | Size: 576 KiB |
Before Width: | Height: | Size: 255 KiB |
BIN
docs/images/controls/DatePicker.png
Normal file
After Width: | Height: | Size: 567 KiB |
BIN
docs/images/controls/LineEdit.png
Normal file
After Width: | Height: | Size: 457 KiB |
BIN
docs/images/controls/Menu.png
Normal file
After Width: | Height: | Size: 351 KiB |
BIN
docs/images/controls/Notification.png
Normal file
After Width: | Height: | Size: 464 KiB |
BIN
docs/images/controls/PopupConfirm.png
Normal file
After Width: | Height: | Size: 228 KiB |
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 204 KiB |
BIN
docs/images/controls/RadioButton.png
Normal file
After Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 174 KiB |
BIN
docs/images/controls/TreeView.png
Normal file
After Width: | Height: | Size: 269 KiB |
@ -1,14 +1,42 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PackageId>AtomUI</PackageId>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Common.props"/>
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props"/>
|
||||
|
||||
<Import Project="..\..\build\CoreLibraries.props" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Avalonia.Svg"/>
|
||||
<PackageReference Include="Avalonia.Win32"/>
|
||||
<PackageReference Include="System.Reactive"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'DEBUG' ">
|
||||
<ProjectReference Include="../../src/AtomUI.Base/AtomUI.Base.csproj" />
|
||||
<ProjectReference Include="../../src/AtomUI.Controls/AtomUI.Controls.csproj" />
|
||||
<ProjectReference Include="../../src/AtomUI.Icon/AtomUI.Icon.csproj" />
|
||||
<ProjectReference Include="../../src/AtomUI.Icon.AntDesign/AtomUI.Icon.AntDesign.csproj" />
|
||||
<ProjectReference Include="../../src/AtomUI.Theme/AtomUI.Theme.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'RELEASE' ">
|
||||
<Reference Include="../../_output/Bin/Release/AtomUI.Base.dll" />
|
||||
<Reference Include="../../_output/Bin/Release/AtomUI.Controls.dll" />
|
||||
<Reference Include="../../_output/Bin/Release/AtomUI.Icon.dll" />
|
||||
<Reference Include="../../_output/Bin/Release/AtomUI.Icon.AntDesign.dll" />
|
||||
<Reference Include="../../_output/Bin/Release/AtomUI.Theme.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'RELEASE' ">
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Base.dll" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Controls.dll" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Icon.dll" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Icon.AntDesign.dll" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Theme.dll" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Base.pdb" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Controls.pdb" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Icon.pdb" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Icon.AntDesign.pdb" />
|
||||
<Content Pack="true" Visible="false" PackagePath="lib\$(TargetFramework)" Include="$(MSBuildThisFileDirectory)..\..\_output\Bin\Release\AtomUI.Theme.pdb" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,9 +0,0 @@
|
||||
<Application
|
||||
x:Class="AtomUI.Demo.Desktop.App"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
RequestedThemeVariant="Light"><!--强制使用默认主题,因目前未适配暗黑主题,如果系统为暗黑主题时,演示demo会展示不正常 -->
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
</Application.Styles>
|
||||
</Application>
|
@ -1,29 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.Views;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace AtomUI.Demo.Desktop;
|
||||
|
||||
public class App : Application
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
switch (ApplicationLifetime)
|
||||
{
|
||||
case IClassicDesktopStyleApplicationLifetime desktop:
|
||||
desktop.MainWindow = new MainWindow();
|
||||
break;
|
||||
case ISingleViewApplicationLifetime singleView:
|
||||
singleView.MainView = new MainView();
|
||||
break;
|
||||
}
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 2.6 KiB |
@ -1,43 +0,0 @@
|
||||
<svg width="130" height="80" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<linearGradient x1="52.348%" y1="74.611%" x2="52.348%" y2="-17.635%" id="a">
|
||||
<stop stop-color="#DEDEDE" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#A9A9A9" stop-opacity=".3" offset="100%"/>
|
||||
</linearGradient>
|
||||
<linearGradient x1="44.79%" y1="100%" x2="44.79%" y2="0%" id="b">
|
||||
<stop stop-color="#FFF" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#96A1C5" stop-opacity=".373" offset="100%"/>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="100%" x2="50%" y2="-19.675%" id="c">
|
||||
<stop stop-color="#FFF" stop-opacity="0" offset="0%"/>
|
||||
<stop stop-color="#919191" stop-opacity=".15" offset="100%"/>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="44.95%" id="d">
|
||||
<stop stop-color="#5389F5" offset="0%"/>
|
||||
<stop stop-color="#416FDC" offset="100%"/>
|
||||
</linearGradient>
|
||||
<linearGradient x1="63.345%" y1="100%" x2="63.345%" y2="-5.316%" id="e">
|
||||
<stop stop-color="#DCE9FF" offset="0%"/>
|
||||
<stop stop-color="#B6CFFF" offset="100%"/>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="f">
|
||||
<stop stop-color="#7CA5F7" offset="0%"/>
|
||||
<stop stop-color="#C4D6FC" offset="100%"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g transform="translate(-1.866 .364)" fill="none" fill-rule="evenodd">
|
||||
<path d="M27.94 14.864c1.326-4.192 2.56-6.802 3.7-7.831 3.157-2.848 7.522-1.298 8.45-1.076 3.26.782 2.2-4.364 4.997-5.41 1.864-.697 3.397.155 4.6 2.556C50.752.863 52.375-.163 54.556.02c3.272.277 4.417 11.328 8.913 8.909 4.497-2.42 10.01-2.973 12.365.623.509.778.704-.429 4.166-4.55C83.462.88 86.914-.936 93.996 1.464c3.22 1.09 5.868 4.045 7.947 8.864 0 6.878 5.06 10.95 15.178 12.213 15.179 1.895 3.397 18.214-15.178 22.993-18.576 4.78-61.343 7.36-84.551-4.716C1.92 32.769 5.436 24.117 27.939 14.864z"
|
||||
fill="url(#a)" opacity=".8"/>
|
||||
<ellipse fill="url(#b)" cx="66" cy="69.166" rx="27.987" ry="6.478"/>
|
||||
<path d="M113.25 77.249c-21.043 5.278-92.87-.759-100.515-3.516-3.721-1.343-7.075-3.868-10.061-7.576a2.822 2.822 0 0 1 2.198-4.593h125.514c2.605 6.938-3.107 12.166-17.136 15.685z"
|
||||
fill="url(#c)" opacity=".675"/>
|
||||
<g fill-rule="nonzero">
|
||||
<path d="M43.396 12.098L33.825.906a2.434 2.434 0 0 0-1.837-.86h-20.58c-.706 0-1.377.324-1.837.86L0 12.098v6.144h43.396v-6.144z"
|
||||
fill="url(#d)" transform="translate(44.08 39.707)"/>
|
||||
<path d="M40.684 18.468L32.307 8.72a2.136 2.136 0 0 0-1.622-.725H12.711c-.617 0-1.22.256-1.622.725l-8.377 9.748v5.354h37.972v-5.354z"
|
||||
fill="url(#e)" transform="translate(44.08 39.707)"/>
|
||||
<path d="M43.396 25.283c0 .853-.384 1.62-.99 2.134l-.123.1a2.758 2.758 0 0 1-1.67.56H2.784c-.342 0-.669-.062-.971-.176l-.15-.06A2.802 2.802 0 0 1 0 25.282V12.165h10.529c1.163 0 2.1.957 2.1 2.118v.015c0 1.162.948 2.099 2.111 2.099h13.916a2.113 2.113 0 0 0 2.111-2.107c0-1.166.938-2.125 2.1-2.125h10.53z"
|
||||
fill="url(#f)" transform="translate(44.08 39.707)"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 194 KiB |
@ -1,46 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\Build\Output.App.props"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>AtomUI.Demo.Desktop</RootNamespace>
|
||||
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="Assets\**"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TrimmerRootDescriptor Include="Roots.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<PublishAot>true</PublishAot>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia"/>
|
||||
<PackageReference Include="Avalonia.Desktop"/>
|
||||
<PackageReference Include="Avalonia.Themes.Fluent"/>
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid"/>
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics"/>
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Nlnet.Avalonia.DevTools"/>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\packages\AtomUI\AtomUI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,5 +0,0 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=base/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=controls_005Ccolors/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=controls_005Cpathicon/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=utils/@EntryIndexedValue">False</s:Boolean></wpf:ResourceDictionary>
|
@ -1,65 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Media;
|
||||
using Separator = AtomUI.Controls.Separator;
|
||||
|
||||
namespace AtomUI.Demo.Desktop;
|
||||
|
||||
public class ShowCaseItem : ContentControl
|
||||
{
|
||||
private bool _initialized;
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
private void SetupUi()
|
||||
{
|
||||
var mainLayout = new StackPanel();
|
||||
var showCaseTitle = new Separator
|
||||
{
|
||||
Title = Title,
|
||||
TitlePosition = SeparatorTitlePosition.Left,
|
||||
FontWeight = FontWeight.Bold
|
||||
};
|
||||
|
||||
if (Content is Control contentControl)
|
||||
{
|
||||
LogicalChildren.Remove(contentControl);
|
||||
mainLayout.Children.Add(contentControl);
|
||||
}
|
||||
|
||||
mainLayout.Children.Add(new Border
|
||||
{
|
||||
Height = 10,
|
||||
Background = Brushes.Transparent
|
||||
});
|
||||
mainLayout.Children.Add(showCaseTitle);
|
||||
mainLayout.Children.Add(new TextBlock
|
||||
{
|
||||
Text = Description,
|
||||
TextWrapping = TextWrapping.Wrap,
|
||||
Margin = new Thickness(0, 10, 0, 0)
|
||||
});
|
||||
|
||||
var outerBorder = new Border
|
||||
{
|
||||
BorderBrush = new SolidColorBrush(new Color(10, 5, 5, 5)),
|
||||
BorderThickness = new Thickness(1),
|
||||
Padding = new Thickness(20),
|
||||
Child = mainLayout,
|
||||
CornerRadius = new CornerRadius(8)
|
||||
};
|
||||
|
||||
Content = outerBorder;
|
||||
}
|
||||
|
||||
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
|
||||
{
|
||||
if (!_initialized)
|
||||
{
|
||||
SetupUi();
|
||||
_initialized = true;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Metadata;
|
||||
using AvaloniaControlList = Avalonia.Controls.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop;
|
||||
|
||||
public class ShowCasePanel : Control
|
||||
{
|
||||
public string? Id { get; protected set; }
|
||||
private bool _initialized;
|
||||
private StackPanel _leftContainer = default!;
|
||||
private StackPanel _rightContainer = default!;
|
||||
|
||||
[Content] public AvaloniaControlList Children { get; } = new();
|
||||
|
||||
protected void SetupUi()
|
||||
{
|
||||
var mainLayout = new UniformGrid
|
||||
{
|
||||
Rows = 1,
|
||||
Columns = 2,
|
||||
Margin = new Thickness(0)
|
||||
};
|
||||
_leftContainer = new StackPanel
|
||||
{
|
||||
Orientation = Orientation.Vertical,
|
||||
Spacing = 10,
|
||||
Margin = new Thickness(0, 0, 10, 0)
|
||||
};
|
||||
_rightContainer = new StackPanel
|
||||
{
|
||||
Orientation = Orientation.Vertical,
|
||||
Spacing = 10
|
||||
};
|
||||
mainLayout.Children.Add(_leftContainer);
|
||||
mainLayout.Children.Add(_rightContainer);
|
||||
|
||||
for (var i = 0; i < Children.Count; ++i)
|
||||
{
|
||||
var control = Children[i];
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
_leftContainer.Children.Add(control);
|
||||
}
|
||||
else
|
||||
{
|
||||
_rightContainer.Children.Add(control);
|
||||
}
|
||||
}
|
||||
|
||||
var scrollView = new ScrollViewer
|
||||
{
|
||||
Content = mainLayout
|
||||
};
|
||||
LogicalChildren.Add(scrollView);
|
||||
VisualChildren.Add(scrollView);
|
||||
}
|
||||
|
||||
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
|
||||
{
|
||||
if (!_initialized)
|
||||
{
|
||||
SetupUi();
|
||||
NotifyShowCaseLayoutReady();
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
base.OnAttachedToLogicalTree(e);
|
||||
}
|
||||
|
||||
internal virtual void NotifyAboutToActive()
|
||||
{
|
||||
}
|
||||
|
||||
internal virtual void NotifyActivated()
|
||||
{
|
||||
}
|
||||
|
||||
internal virtual void NotifyAboutToDeactivated()
|
||||
{
|
||||
}
|
||||
|
||||
internal virtual void NotifyDeactivated()
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void NotifyShowCaseLayoutReady()
|
||||
{
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:ColorItemViewModel">
|
||||
<Design.PreviewWith>
|
||||
<controls:ColorItemControl />
|
||||
</Design.PreviewWith>
|
||||
|
||||
<ControlTheme x:Key="{x:Type controls:ColorItemControl}" TargetType="controls:ColorItemControl">
|
||||
<Setter Property="controls:ColorItemControl.Height" Value="35" />
|
||||
<Setter Property="controls:ColorItemControl.Template">
|
||||
<ControlTemplate TargetType="controls:ColorItemControl">
|
||||
<Border Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Panel>
|
||||
<TextBlock Padding="8"
|
||||
FontSize="12"
|
||||
FontWeight="600"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{TemplateBinding ColorName}" />
|
||||
<TextBlock Name="PART_HexTextBlock"
|
||||
Padding="8"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="10"
|
||||
FontWeight="600"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="False"
|
||||
Opacity="0.8"
|
||||
Text="{TemplateBinding Hex}" />
|
||||
</Panel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover /template/ TextBlock#PART_HexTextBlock">
|
||||
<Setter Property="TextBlock.IsVisible" Value="True" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
@ -1,38 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.ViewModels;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.Controls;
|
||||
|
||||
public class ColorItemControl : TemplatedControl
|
||||
{
|
||||
public static readonly StyledProperty<string?> ColorNameProperty =
|
||||
AvaloniaProperty.Register<ColorItemControl, string?>(
|
||||
nameof(ColorName));
|
||||
|
||||
public string? ColorName
|
||||
{
|
||||
get => GetValue(ColorNameProperty);
|
||||
set => SetValue(ColorNameProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<string?> HexProperty = AvaloniaProperty.Register<ColorItemControl, string?>(
|
||||
nameof(Hex));
|
||||
|
||||
public string? Hex
|
||||
{
|
||||
get => GetValue(HexProperty);
|
||||
set => SetValue(HexProperty, value);
|
||||
}
|
||||
|
||||
protected override void OnPointerPressed(PointerPressedEventArgs e)
|
||||
{
|
||||
base.OnPointerPressed(e);
|
||||
if (DataContext is ColorItemViewModel v)
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(v);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:ColorListViewModel">
|
||||
|
||||
<ControlTheme x:Key="{x:Type controls:ColorListControl}" TargetType="controls:ColorListControl">
|
||||
<Setter Property="controls:ColorListControl.Template">
|
||||
<ControlTemplate TargetType="controls:ColorListControl">
|
||||
<ItemsControl ItemsSource="{Binding Colors}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:ColorItemViewModel">
|
||||
<controls:ColorItemControl Background="{Binding Brush}"
|
||||
ColorName="{Binding ColorDisplayName}"
|
||||
Foreground="{Binding TextBrush}"
|
||||
Hex="{Binding Hex}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
</ControlTheme>
|
||||
|
||||
</ResourceDictionary>
|
@ -1,18 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.ViewModels;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Primitives;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.Controls;
|
||||
|
||||
public class ColorListControl : TemplatedControl
|
||||
{
|
||||
public static readonly StyledProperty<ColorListViewModel> ListDataProperty =
|
||||
AvaloniaProperty.Register<ColorListGroupControl, ColorListViewModel>(
|
||||
nameof(ListData), new ColorListViewModel());
|
||||
|
||||
public ColorListViewModel ListData
|
||||
{
|
||||
get => GetValue(ListDataProperty);
|
||||
set => SetValue(ListDataProperty, value);
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:ColorGroupViewModel">
|
||||
|
||||
<ControlTheme x:Key="{x:Type controls:ColorListGroupControl}" TargetType="controls:ColorListGroupControl">
|
||||
<Setter Property="controls:ColorListGroupControl.Template">
|
||||
<ControlTemplate TargetType="controls:ColorListGroupControl">
|
||||
<ItemsControl ItemsSource="{Binding ColorList }">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="1" Columns="2" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:ColorListViewModel">
|
||||
<controls:ColorListControl ListData="{Binding}"
|
||||
Margin="10" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
@ -1,18 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.ViewModels;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Primitives;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.Controls;
|
||||
|
||||
public class ColorListGroupControl : TemplatedControl
|
||||
{
|
||||
public static readonly StyledProperty<ColorGroupViewModel> GroupDataProperty =
|
||||
AvaloniaProperty.Register<ColorListGroupControl, ColorGroupViewModel>(
|
||||
nameof(GroupData), new ColorGroupViewModel());
|
||||
|
||||
public ColorGroupViewModel GroupData
|
||||
{
|
||||
get => GetValue(GroupDataProperty);
|
||||
set => SetValue(GroupDataProperty, value);
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:IconGalleryModel">
|
||||
|
||||
<ControlTheme x:Key="{x:Type controls:IconGallery}" TargetType="controls:IconGallery">
|
||||
<Setter Property="controls:IconGallery.Template">
|
||||
<ControlTemplate TargetType="controls:IconGallery">
|
||||
<ItemsControl ItemsSource="{Binding IconInfos}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:IconInfoItemModel">
|
||||
<controls:IconInfoItem
|
||||
IconName="{Binding IconName}"
|
||||
IconKind="{Binding IconKind}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
@ -1,54 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.ViewModels;
|
||||
using AtomUI.Icon;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.LogicalTree;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.Controls;
|
||||
|
||||
public class IconGallery : TemplatedControl
|
||||
{
|
||||
private bool _initialized;
|
||||
private readonly IconGalleryModel _galleryModel;
|
||||
|
||||
public static readonly StyledProperty<IconThemeType?> IconThemeTypeProperty =
|
||||
AvaloniaProperty.Register<IconInfoItem, IconThemeType?>(
|
||||
nameof(IconThemeType));
|
||||
|
||||
public IconThemeType? IconThemeType
|
||||
{
|
||||
get => GetValue(IconThemeTypeProperty);
|
||||
set => SetValue(IconThemeTypeProperty, value);
|
||||
}
|
||||
|
||||
public IconGallery()
|
||||
{
|
||||
_galleryModel = new IconGalleryModel();
|
||||
DataContext = _galleryModel;
|
||||
}
|
||||
|
||||
protected override void OnPointerPressed(PointerPressedEventArgs e)
|
||||
{
|
||||
base.OnPointerPressed(e);
|
||||
if (DataContext is ColorItemViewModel v)
|
||||
{
|
||||
WeakReferenceMessenger.Default.Send(v);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnAttachedToLogicalTree(e);
|
||||
if (!_initialized)
|
||||
{
|
||||
if (IconThemeType.HasValue)
|
||||
{
|
||||
_galleryModel.LoadThemeIcons(IconThemeType.Value);
|
||||
}
|
||||
|
||||
_initialized = true;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
xmlns:atom="https://atomui.net"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:IconInfoItemModel">
|
||||
|
||||
<ControlTheme x:Key="{x:Type controls:IconInfoItem}" TargetType="controls:IconInfoItem">
|
||||
<Setter Property="Height" Value="150" />
|
||||
<Setter Property="Width" Value="150" />
|
||||
<Setter Property="Margin" Value="10" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="controls:IconInfoItem">
|
||||
<Border
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<atom:PathIcon
|
||||
HorizontalAlignment="Center"
|
||||
Kind="{Binding IconKind}"
|
||||
Width="48"
|
||||
Height="48" />
|
||||
<TextBlock
|
||||
Margin="0,20, 0, 0"
|
||||
Padding="8"
|
||||
FontSize="13"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Text="{Binding IconName}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<!-- <Style Selector="^:pointerover /template/ TextBlock#PART_HexTextBlock"> -->
|
||||
<!-- <Setter Property="TextBlock.IsVisible" Value="True" /> -->
|
||||
<!-- </Style> -->
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
@ -1,25 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Primitives;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.Controls;
|
||||
|
||||
public class IconInfoItem : TemplatedControl
|
||||
{
|
||||
public static readonly StyledProperty<string> IconNameProperty = AvaloniaProperty.Register<IconInfoItem, string>(
|
||||
nameof(IconName));
|
||||
|
||||
public string IconName
|
||||
{
|
||||
get => GetValue(IconNameProperty);
|
||||
set => SetValue(IconNameProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<string> IconKindProperty = AvaloniaProperty.Register<IconInfoItem, string>(
|
||||
nameof(IconKind));
|
||||
|
||||
public string IconKind
|
||||
{
|
||||
get => GetValue(IconKindProperty);
|
||||
set => SetValue(IconKindProperty, value);
|
||||
}
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
using AtomUI.Icon;
|
||||
using AtomUI.Icon.AntDesign;
|
||||
using AtomUI.Theme;
|
||||
using Avalonia;
|
||||
using Avalonia.Dialogs;
|
||||
using Avalonia.Media;
|
||||
#if DEBUG
|
||||
using Nlnet.Avalonia.DevTools;
|
||||
#endif
|
||||
|
||||
namespace AtomUI.Demo.Desktop;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||
// yet and stuff might break.
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
BuildAvaloniaApp()
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = new[]
|
||||
{
|
||||
new FontFallback
|
||||
{
|
||||
FontFamily = new FontFamily("Microsoft YaHei")
|
||||
}
|
||||
}
|
||||
})
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
File.WriteAllText("error.log", ex.ToString());
|
||||
#if DEBUG
|
||||
throw;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static AppBuilder BuildAvaloniaApp()
|
||||
=> AppBuilder.Configure<App>()
|
||||
.ConfigureAtomUI()
|
||||
.UseManagedSystemDialogs()
|
||||
.UsePlatformDetect()
|
||||
.UseAtomUI()
|
||||
#if DEBUG
|
||||
.UseDevToolsForAvalonia()
|
||||
#endif
|
||||
.UseIconPackage<AntDesignIconPackage>(true)
|
||||
.With(new Win32PlatformOptions())
|
||||
.LogToTrace();
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<linker>
|
||||
<assembly fullname="AtomUI.Demo.Desktop" preserve="All"/>
|
||||
<assembly fullname="AtomUI.Theme" preserve="All"/>
|
||||
<assembly fullname="Avalonia.Base" preserve="All"/>
|
||||
<assembly fullname="AtomUI.Controls" preserve="All"/>
|
||||
<assembly fullname="AtomUI.Icon" preserve="All"/>
|
||||
<assembly fullname="AtomUI.Icon.AntDesign" preserve="All"/>
|
||||
<assembly fullname="Avalonia.Remote.Protocol" preserve="All"/>
|
||||
</linker>
|
@ -1,160 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.AlertShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="The simplest usage for short messages.">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<atom:Alert Classes="test" Type="Success">Success Text</atom:Alert>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="More types"
|
||||
Description="There are 4 types of Alert: success, info, warning, error.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Alert Type="Success">Success Text</atom:Alert>
|
||||
<atom:Alert Type="Info">Info Text</atom:Alert>
|
||||
<atom:Alert Type="Warning">Warning Text</atom:Alert>
|
||||
<atom:Alert Type="Error">Error Text</atom:Alert>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Closable"
|
||||
Description="To show close button.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Alert Type="Warning" IsClosable="True">
|
||||
Warning Text Warning Text Warning Text Warning Text Warning Text Warning TextWarning Text
|
||||
</atom:Alert>
|
||||
<atom:Alert Type="Error" IsClosable="True"
|
||||
Description="Error Description Error Description Error Description Error Description Error Description Error Description">
|
||||
Error Text
|
||||
</atom:Alert>
|
||||
<atom:Alert Type="Error" IsClosable="True"
|
||||
Description="Error Description Error Description Error Description Error Description Error Description Error Description"
|
||||
CloseIcon="{atom:IconProvider CloseSquareFilled}">
|
||||
Error Text
|
||||
</atom:Alert>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Description"
|
||||
Description="Additional description for alert message.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Alert Type="Success"
|
||||
Message="Success Text"
|
||||
Description="Success Description Success Description Success Description" />
|
||||
<atom:Alert Type="Info"
|
||||
Message="Info Text"
|
||||
Description="Info Description Info Description Info Description Info Description" />
|
||||
<atom:Alert Type="Warning"
|
||||
Message="Warning Text"
|
||||
Description="Warning Description Warning Description Warning Description Warning Description" />
|
||||
<atom:Alert Type="Error"
|
||||
Message="Error Text"
|
||||
Description="Error Description Error Description Error Description Error Description" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Description"
|
||||
Description="Additional description for alert message.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Alert Type="Success"
|
||||
Message="Success Tips"
|
||||
IsShowIcon="True" />
|
||||
<atom:Alert Type="Info"
|
||||
Message="Informational Notes"
|
||||
IsShowIcon="True" />
|
||||
<atom:Alert Type="Warning"
|
||||
Message="Warning"
|
||||
IsShowIcon="True"
|
||||
IsClosable="True" />
|
||||
<atom:Alert Type="Error"
|
||||
Message="Error"
|
||||
IsShowIcon="True" />
|
||||
|
||||
<atom:Alert Type="Success"
|
||||
Message="Success Tips"
|
||||
IsShowIcon="True"
|
||||
Description="Detailed description and advice about successful copywriting." />
|
||||
<atom:Alert Type="Info"
|
||||
Message="Informational Notes"
|
||||
IsShowIcon="True"
|
||||
Description="Additional description and information about copywriting." />
|
||||
<atom:Alert Type="Warning"
|
||||
Message="Warning"
|
||||
IsClosable="True"
|
||||
IsShowIcon="True"
|
||||
Description="This is a warning notice about copywriting." />
|
||||
<atom:Alert Type="Error"
|
||||
Message="Error"
|
||||
IsShowIcon="True"
|
||||
Description="This is an error message about copywriting." />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Custom action"
|
||||
Description="Custom action.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Alert Type="Success"
|
||||
IsShowIcon="True"
|
||||
IsClosable="true">
|
||||
<atom:Alert.ExtraAction>
|
||||
<atom:Button ButtonType="Text" SizeType="Small">UNDO</atom:Button>
|
||||
</atom:Alert.ExtraAction>
|
||||
Success Tips
|
||||
</atom:Alert>
|
||||
|
||||
<atom:Alert Type="Error"
|
||||
IsShowIcon="True"
|
||||
Description="Error Description Error Description Error Description Error Description">
|
||||
<atom:Alert.ExtraAction>
|
||||
<atom:Button ButtonType="Default" SizeType="Small" IsDanger="True">Detail</atom:Button>
|
||||
</atom:Alert.ExtraAction>
|
||||
Error Text
|
||||
</atom:Alert>
|
||||
|
||||
<atom:Alert Type="Warning"
|
||||
IsClosable="true">
|
||||
<atom:Alert.ExtraAction>
|
||||
<atom:Button ButtonType="Text" SizeType="Small">Done</atom:Button>
|
||||
</atom:Alert.ExtraAction>
|
||||
Warning Text
|
||||
</atom:Alert>
|
||||
|
||||
<atom:Alert Type="Info"
|
||||
IsShowIcon="False"
|
||||
IsClosable="true"
|
||||
Description="Info Description Info Description Info Description Info Description">
|
||||
<atom:Alert.ExtraAction>
|
||||
<StackPanel Orientation="Vertical" Spacing="5">
|
||||
<atom:Button ButtonType="Primary" SizeType="Small">Accept</atom:Button>
|
||||
<atom:Button SizeType="Small" IsDanger="True" IsGhost="True">Decline</atom:Button>
|
||||
</StackPanel>
|
||||
</atom:Alert.ExtraAction>
|
||||
Info Text
|
||||
</atom:Alert>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Loop Banner"
|
||||
Description="Show a loop banner.">
|
||||
<atom:Alert Type="Warning" IsShowIcon="True" IsMessageMarqueEnabled="True">
|
||||
I can be a React component, multiple React components, or just some text, Info Description Info Description Info Description Info Description
|
||||
</atom:Alert>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class AlertShowCase : UserControl
|
||||
{
|
||||
public AlertShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.AvatarShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel />
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class AvatarShowCase : UserControl
|
||||
{
|
||||
public AvatarShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,334 +0,0 @@
|
||||
<UserControl x:Class="AtomUI.Demo.Desktop.ShowCase.BadgeShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
|
||||
<desktop:ShowCaseItem Title="Basic"
|
||||
Description="Simplest Usage. Badge will be hidden when count is 0, but we can use showZero to show it.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<atom:CountBadge Count="5">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
<atom:CountBadge Count="0">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Overflow Count"
|
||||
Description="${overflowCount}+ is displayed when count is larger than overflowCount. The default value of overflowCount is 99.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<atom:CountBadge Count="99">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
<atom:CountBadge Count="100">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
<atom:CountBadge Count="99" OverflowCount="10">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
<atom:CountBadge Count="1000" OverflowCount="999">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Offset"
|
||||
Description="Set offset of the badge dot, the format is [left, top], which represents the offset of the status dot from the left and top of the default position.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<atom:CountBadge Count="5" Offset="10, 10">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Size" Description="Set size of numeral Badge.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<atom:CountBadge Count="5">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
<atom:CountBadge Count="5" Size="Small">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Standalone" Description="Used in standalone when children is empty.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:ToggleSwitch IsChecked="{Binding StandaloneSwitchChecked}" />
|
||||
<atom:CountBadge BadgeColor="#faad14"
|
||||
Count="{Binding StandaloneBadgeCount1}"
|
||||
ShowZero="True" />
|
||||
<atom:CountBadge Count="{Binding StandaloneBadgeCount2}" />
|
||||
<atom:CountBadge BadgeColor="#52c41a" Count="{Binding StandaloneBadgeCount3}" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Dynamic" Description="The count will be animated as it changes.">
|
||||
<StackPanel Orientation="Vertical" Spacing="20">
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<atom:CountBadge Count="{Binding DynamicBadgeCount}" OverflowCount="99">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:CountBadge>
|
||||
<StackPanel VerticalAlignment="Center"
|
||||
Orientation="Horizontal"
|
||||
Spacing="10">
|
||||
<atom:Button Command="{Binding AddDynamicBadgeCount}" SizeType="Small">Add</atom:Button>
|
||||
<atom:Button Command="{Binding SubDynamicBadgeCount}" SizeType="Small">Sub</atom:Button>
|
||||
<atom:Button Command="{Binding RandomDynamicBadgeCount}" SizeType="Small">Random</atom:Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<atom:DotBadge BadgeIsVisible="{Binding DynamicDotBadgeVisible}">
|
||||
<Border Width="40"
|
||||
Height="40"
|
||||
Background="rgb(191,191,191)"
|
||||
CornerRadius="8" />
|
||||
</atom:DotBadge>
|
||||
<atom:ToggleSwitch VerticalAlignment="Center"
|
||||
IsChecked="{Binding DynamicDotBadgeVisible, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Red badge"
|
||||
Description="This will simply display a red badge, without a specific count. If count equals 0, it won't display the dot.">
|
||||
<StackPanel Orientation="Vertical" Spacing="20">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:DotBadge Offset="15,9">
|
||||
<atom:Button ButtonType="Link" Icon="{atom:IconProvider Kind=NotificationOutlined}" />
|
||||
</atom:DotBadge>
|
||||
<atom:DotBadge Offset="15,12">
|
||||
<atom:Button ButtonType="Link" Text="Link something" />
|
||||
</atom:DotBadge>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Status" Description="Standalone badge with status.">
|
||||
<StackPanel Orientation="Vertical" Spacing="20">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:DotBadge Status="Success" />
|
||||
<atom:DotBadge Status="Error" />
|
||||
<atom:DotBadge Status="Default" />
|
||||
<atom:DotBadge Status="Processing" />
|
||||
<atom:DotBadge Status="Warning" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:DotBadge Status="Success" Text="Success" />
|
||||
<atom:DotBadge Status="Error" Text="Error" />
|
||||
<atom:DotBadge Status="Default" Text="Default" />
|
||||
<atom:DotBadge Status="Processing" Text="Processing" />
|
||||
<atom:DotBadge Status="Warning" Text="Warning" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Ribbon" Description="Use ribbon badge.">
|
||||
<StackPanel Margin="20,0,20,0"
|
||||
Orientation="Vertical"
|
||||
Spacing="20">
|
||||
<atom:RibbonBadge Text="精益求精,打造体验优秀的 UISDK">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
<atom:RibbonBadge RibbonColor="Pink" Text="甲辰计划雄起">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
<atom:RibbonBadge RibbonColor="Cyan" Text="Avalonia 非常优秀">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
<atom:RibbonBadge RibbonColor="Green" Text="Hippies">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
<atom:RibbonBadge Placement="Start"
|
||||
RibbonColor="purple"
|
||||
Text="Hippies">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
<atom:RibbonBadge Placement="Start"
|
||||
RibbonColor="volcano"
|
||||
Text="Hippies">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
<atom:RibbonBadge Placement="Start"
|
||||
RibbonColor="magenta"
|
||||
Text="Hippies">
|
||||
<Border Height="80"
|
||||
Padding="10,0,10,0"
|
||||
BorderBrush="#d9d9d9"
|
||||
BorderThickness="1"
|
||||
CornerRadius="6">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Height="38"
|
||||
FontWeight="Bold"
|
||||
LineHeight="38">
|
||||
Pushes open the window
|
||||
</TextBlock>
|
||||
<atom:Separator LineColor="#d9d9d9" Orientation="Horizontal" />
|
||||
<TextBlock Margin="0,10,0,0">and raises the spyglass.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</atom:RibbonBadge>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Colorful Badge"
|
||||
Description="We preset a series of colorful Badge styles for use in different situations. You can also set it to a hex color string for custom color.">
|
||||
<StackPanel Orientation="Vertical" Spacing="20">
|
||||
<atom:Separator Title="Presets"
|
||||
FontWeight="SemiBold"
|
||||
TitlePosition="Left" />
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:DotBadge DotColor="Pink" Text="Pink" />
|
||||
<atom:DotBadge DotColor="Red" Text="Red" />
|
||||
<atom:DotBadge DotColor="Yellow" Text="Yellow" />
|
||||
<atom:DotBadge DotColor="Orange" Text="Orange" />
|
||||
<atom:DotBadge DotColor="Cyan" Text="Cyan" />
|
||||
<atom:DotBadge DotColor="Green" Text="Green" />
|
||||
<atom:DotBadge DotColor="Blue" Text="Blue" />
|
||||
<atom:DotBadge DotColor="Purple" Text="Purple" />
|
||||
<atom:DotBadge DotColor="GeekBlue" Text="GeekBlue" />
|
||||
<atom:DotBadge DotColor="Magenta" Text="Magenta" />
|
||||
<atom:DotBadge DotColor="Volcano" Text="Volcano" />
|
||||
<atom:DotBadge DotColor="Gold" Text="Gold" />
|
||||
<atom:DotBadge DotColor="Lime" Text="Lime" />
|
||||
</StackPanel>
|
||||
<atom:Separator Title="Custom"
|
||||
FontWeight="SemiBold"
|
||||
TitlePosition="Left" />
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:DotBadge DotColor="#f50" Text="#f50" />
|
||||
<atom:DotBadge DotColor="rgb(45, 183, 245)" Text="rgb(45, 183, 245)" />
|
||||
<atom:DotBadge DotColor="hsl(102, 53%, 61%)" Text="hsl(102, 53%, 61%)" />
|
||||
<atom:DotBadge DotColor="rgb(15, 141, 230)" Text="rgb(15, 141, 230)" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,107 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class BadgeShowCase : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<double> DynamicBadgeCountProperty =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, double>(nameof(DynamicBadgeCount), 5);
|
||||
|
||||
public static readonly StyledProperty<bool> DynamicDotBadgeVisibleProperty =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, bool>(nameof(DynamicDotBadgeVisible), true);
|
||||
|
||||
public static readonly StyledProperty<bool> StandaloneSwitchCheckedProperty =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, bool>(nameof(StandaloneSwitchChecked), true);
|
||||
|
||||
public static readonly StyledProperty<double> StandaloneBadgeCount1Property =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, double>(nameof(StandaloneBadgeCount1), 11);
|
||||
|
||||
public static readonly StyledProperty<double> StandaloneBadgeCount2Property =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, double>(nameof(StandaloneBadgeCount2), 25);
|
||||
|
||||
public static readonly StyledProperty<double> StandaloneBadgeCount3Property =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, double>(nameof(StandaloneBadgeCount3), 109);
|
||||
|
||||
public double DynamicBadgeCount
|
||||
{
|
||||
get => GetValue(DynamicBadgeCountProperty);
|
||||
set => SetValue(DynamicBadgeCountProperty, value);
|
||||
}
|
||||
|
||||
public bool DynamicDotBadgeVisible
|
||||
{
|
||||
get => GetValue(DynamicDotBadgeVisibleProperty);
|
||||
set => SetValue(DynamicDotBadgeVisibleProperty, value);
|
||||
}
|
||||
|
||||
public bool StandaloneSwitchChecked
|
||||
{
|
||||
get => GetValue(StandaloneSwitchCheckedProperty);
|
||||
set => SetValue(StandaloneSwitchCheckedProperty, value);
|
||||
}
|
||||
|
||||
public double StandaloneBadgeCount1
|
||||
{
|
||||
get => GetValue(StandaloneBadgeCount1Property);
|
||||
set => SetValue(StandaloneBadgeCount1Property, value);
|
||||
}
|
||||
|
||||
public double StandaloneBadgeCount2
|
||||
{
|
||||
get => GetValue(StandaloneBadgeCount2Property);
|
||||
set => SetValue(StandaloneBadgeCount2Property, value);
|
||||
}
|
||||
|
||||
public double StandaloneBadgeCount3
|
||||
{
|
||||
get => GetValue(StandaloneBadgeCount3Property);
|
||||
set => SetValue(StandaloneBadgeCount3Property, value);
|
||||
}
|
||||
|
||||
public BadgeShowCase()
|
||||
{
|
||||
DataContext = this;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void AddDynamicBadgeCount()
|
||||
{
|
||||
DynamicBadgeCount += 1;
|
||||
}
|
||||
|
||||
public void SubDynamicBadgeCount()
|
||||
{
|
||||
var value = DynamicBadgeCount;
|
||||
value -= 1;
|
||||
value = Math.Max(value, 0);
|
||||
DynamicBadgeCount = value;
|
||||
}
|
||||
|
||||
public void RandomDynamicBadgeCount()
|
||||
{
|
||||
var random = new Random();
|
||||
DynamicBadgeCount = random.Next(0, 110);
|
||||
}
|
||||
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs args)
|
||||
{
|
||||
base.OnPropertyChanged(args);
|
||||
if (args.Property == StandaloneSwitchCheckedProperty)
|
||||
{
|
||||
var isChecked = args.GetNewValue<bool>();
|
||||
if (isChecked)
|
||||
{
|
||||
StandaloneBadgeCount1 = 11;
|
||||
StandaloneBadgeCount2 = 25;
|
||||
StandaloneBadgeCount3 = 109;
|
||||
}
|
||||
else
|
||||
{
|
||||
StandaloneBadgeCount1 = 0;
|
||||
StandaloneBadgeCount2 = 0;
|
||||
StandaloneBadgeCount3 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,325 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.ButtonShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCasePanel.Styles>
|
||||
<Style Selector="atom|Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</desktop:ShowCasePanel.Styles>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Type"
|
||||
Description="There are primary button, default button, dashed button, text button and link button in antd.">
|
||||
<WrapPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary">Primary Button</atom:Button>
|
||||
<atom:Button>Default Button</atom:Button>
|
||||
<atom:Button ButtonType="Text">Text Button</atom:Button>
|
||||
<atom:Button ButtonType="Link">Link Button</atom:Button>
|
||||
</WrapPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Button Shape"
|
||||
Description="Supported button shape display, such as primary, default, dashed and Text, etc.">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<WrapPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="0, 0, 0, 20">
|
||||
<atom:Button ButtonType="Primary">Primary</atom:Button>
|
||||
<atom:Button>Default</atom:Button>
|
||||
<atom:Button ButtonType="Text">Text</atom:Button>
|
||||
<atom:Button ButtonType="Link">Link</atom:Button>
|
||||
</WrapPanel>
|
||||
<WrapPanel HorizontalAlignment="Left" Orientation="Horizontal" Margin="0, 0, 0, 20">
|
||||
<atom:Button ButtonType="Primary" Shape="Round">Primary</atom:Button>
|
||||
<atom:Button Shape="Round">Default</atom:Button>
|
||||
<atom:Button ButtonType="Text" Shape="Round">Text</atom:Button>
|
||||
<atom:Button ButtonType="Link" Shape="Round">Link</atom:Button>
|
||||
</WrapPanel>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="10" Orientation="Horizontal" Margin="0, 0, 0, 20">
|
||||
<atom:Button ButtonType="Primary" Shape="Circle">AA</atom:Button>
|
||||
<atom:Button Shape="Circle">AA</atom:Button>
|
||||
<atom:Button ButtonType="Text" Shape="Circle">AA</atom:Button>
|
||||
<atom:Button ButtonType="Link" Shape="Circle">AA</atom:Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Size"
|
||||
Description="AtomUI supports three sizes of buttons: small, default and large.
|
||||
If a large or small button is desired, set the size property to either large or small respectively. Omit the size property for a button with the default size.">
|
||||
<DockPanel Margin="0, 0, 0, 0">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" DockPanel.Dock="Top">
|
||||
<TextBlock VerticalAlignment="Center">Expand direction:</TextBlock>
|
||||
<atom:OptionButtonGroup ButtonStyle="Outline" Name="ButtonSizeTypeOptionGroup">
|
||||
<atom:OptionButton IsChecked="True">Large</atom:OptionButton>
|
||||
<atom:OptionButton>Default</atom:OptionButton>
|
||||
<atom:OptionButton>Small</atom:OptionButton>
|
||||
</atom:OptionButtonGroup>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" Margin="0, 20, 0, 0" Spacing="10">
|
||||
<WrapPanel>
|
||||
<atom:Button ButtonType="Primary" SizeType="{Binding ButtonSizeType}">Primary</atom:Button>
|
||||
<atom:Button ButtonType="Default" SizeType="{Binding ButtonSizeType}">Default</atom:Button>
|
||||
<atom:Button ButtonType="Link" SizeType="{Binding ButtonSizeType}">Link</atom:Button>
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<atom:Button ButtonType="Primary" Shape="Default"
|
||||
Icon="{atom:IconProvider Kind=DownloadOutlined}"
|
||||
SizeType="{Binding ButtonSizeType}" />
|
||||
<atom:Button ButtonType="Primary" Shape="Circle"
|
||||
Icon="{atom:IconProvider Kind=DownloadOutlined}"
|
||||
SizeType="{Binding ButtonSizeType}" />
|
||||
<atom:Button ButtonType="Primary" Shape="Round"
|
||||
Icon="{atom:IconProvider Kind=DownloadOutlined}"
|
||||
SizeType="{Binding ButtonSizeType}" />
|
||||
<atom:Button ButtonType="Primary" Shape="Round"
|
||||
Icon="{atom:IconProvider Kind=DownloadOutlined}"
|
||||
SizeType="{Binding ButtonSizeType}">
|
||||
Download
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" Shape="Default"
|
||||
Icon="{atom:IconProvider Kind=DownloadOutlined}"
|
||||
SizeType="{Binding ButtonSizeType}">
|
||||
Download
|
||||
</atom:Button>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Icon"
|
||||
Description="You can add an icon through the icon property and adjust the position of the icon using iconPosition.">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<WrapPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary" Shape="Circle" Icon="{atom:IconProvider Kind=SearchOutlined}" />
|
||||
<atom:Button ButtonType="Primary" Shape="Round"
|
||||
Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
<atom:Button ButtonType="Default" Shape="Circle" Icon="{atom:IconProvider Kind=SearchOutlined}" />
|
||||
<atom:Button ButtonType="Default" Shape="Round" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
<atom:Button ButtonType="Text" Shape="Default" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
<atom:Button ButtonType="Link" Shape="Default" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
</WrapPanel>
|
||||
<WrapPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary" IsDanger="True" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
<atom:Button ButtonType="Default" Shape="Round" IsDanger="True"
|
||||
Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
<atom:Button ButtonType="Text" Shape="Default" IsDanger="True"
|
||||
Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
|
||||
<atom:Button ButtonType="Link" Shape="Default" IsDanger="True"
|
||||
Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Search
|
||||
</atom:Button>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Loading"
|
||||
Description="A loading indicator can be added to a button by setting the loading property on the Button.">
|
||||
<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical" Margin="10">
|
||||
<WrapPanel>
|
||||
<atom:Button ButtonType="Primary" IsLoading="True">Loading</atom:Button>
|
||||
<atom:Button ButtonType="Primary" SizeType="Small" IsLoading="True">Loading</atom:Button>
|
||||
<atom:Button ButtonType="Primary" IsLoading="True" Icon="{atom:IconProvider Kind=PoweroffOutlined}" />
|
||||
</WrapPanel>
|
||||
<WrapPanel>
|
||||
<atom:Button ButtonType="Primary" Name="LoadingBtn1">Click me!</atom:Button>
|
||||
<atom:Button ButtonType="Primary" Name="LoadingBtn2"
|
||||
Icon="{atom:IconProvider Kind=PoweroffOutlined}">
|
||||
Click me!
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" Name="LoadingBtn3"
|
||||
Icon="{atom:IconProvider Kind=PoweroffOutlined}" />
|
||||
</WrapPanel>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Block Button"
|
||||
Description="block property will make the button fit to its parent width.">
|
||||
<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical" Margin="10">
|
||||
<atom:Button ButtonType="Primary" HorizontalAlignment="Stretch">
|
||||
Primary
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" HorizontalAlignment="Stretch">
|
||||
Default
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Text" HorizontalAlignment="Stretch">
|
||||
Text
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Link" HorizontalAlignment="Stretch">
|
||||
Link
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Danger Buttons"
|
||||
Description="danger is a property of button after antd 4.0.">
|
||||
<WrapPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary" IsDanger="True">
|
||||
Primary
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" IsDanger="True">
|
||||
Default
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Text" IsDanger="True">
|
||||
Text
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Link" IsDanger="True">
|
||||
Link
|
||||
</atom:Button>
|
||||
</WrapPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Ghost Button"
|
||||
Description="ghost property will make button's background transparent, it is commonly used in colored background.">
|
||||
<Border Background="rgb(190, 200, 200)"
|
||||
Margin="10"
|
||||
Padding="10">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<WrapPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary" IsGhost="True">
|
||||
Primary
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" IsGhost="True">
|
||||
Default
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Text" IsGhost="True">
|
||||
Text
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Link" IsGhost="True">
|
||||
Link
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" IsDanger="True" IsGhost="True">
|
||||
Danger
|
||||
</atom:Button>
|
||||
</WrapPanel>
|
||||
<WrapPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary" IsGhost="True" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Primary
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" IsGhost="True" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Default
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Text" IsGhost="True" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Text
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Link" IsGhost="True" Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Link
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" IsDanger="True" IsGhost="True"
|
||||
Icon="{atom:IconProvider Kind=SearchOutlined}">
|
||||
Danger
|
||||
</atom:Button>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Disabled"
|
||||
Description="To mark a button as disabled, add the disabled property to the Button.">
|
||||
<WrapPanel HorizontalAlignment="Stretch" Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary">
|
||||
Primary
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" IsEnabled="False">
|
||||
Primary(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Default">
|
||||
Default
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" IsEnabled="False">
|
||||
Default(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Text">
|
||||
Text
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Text" IsEnabled="False">
|
||||
Text(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Link">
|
||||
Link
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Link" IsEnabled="False">
|
||||
Link(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Primary" IsDanger="True">
|
||||
Danger Primary
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" IsDanger="True" IsEnabled="False">
|
||||
Danger Primary(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Default" IsDanger="True">
|
||||
Danger Default
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" IsDanger="True" IsEnabled="False">
|
||||
Danger Default(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Text" IsDanger="True">
|
||||
Danger Text
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Text" IsDanger="True" IsEnabled="False">
|
||||
Danger Text(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:Button ButtonType="Link" IsDanger="True">
|
||||
Danger Link
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Link" IsDanger="True" IsEnabled="False">
|
||||
Danger Link(disabled)
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,60 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Threading;
|
||||
using Button = AtomUI.Controls.Button;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class ButtonShowCase : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<SizeType> ButtonSizeTypeProperty =
|
||||
AvaloniaProperty.Register<ButtonShowCase, SizeType>(nameof(ButtonSizeType));
|
||||
|
||||
public SizeType ButtonSizeType
|
||||
{
|
||||
get => GetValue(ButtonSizeTypeProperty);
|
||||
set => SetValue(ButtonSizeTypeProperty, value);
|
||||
}
|
||||
|
||||
public ButtonShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
|
||||
ButtonSizeTypeOptionGroup.OptionCheckedChanged += HandleButtonSizeTypeOptionCheckedChanged;
|
||||
LoadingBtn1.Click += HandleLoadingBtnClick;
|
||||
LoadingBtn2.Click += HandleLoadingBtnClick;
|
||||
LoadingBtn3.Click += HandleLoadingBtnClick;
|
||||
}
|
||||
|
||||
private void HandleButtonSizeTypeOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
|
||||
{
|
||||
if (args.Index == 0)
|
||||
{
|
||||
ButtonSizeType = SizeType.Large;
|
||||
}
|
||||
else if (args.Index == 1)
|
||||
{
|
||||
ButtonSizeType = SizeType.Middle;
|
||||
}
|
||||
else
|
||||
{
|
||||
ButtonSizeType = SizeType.Small;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleLoadingBtnClick(object? sender, RoutedEventArgs args)
|
||||
{
|
||||
if (sender is Button button)
|
||||
{
|
||||
button.IsLoading = true;
|
||||
Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(3));
|
||||
button.IsLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -1,248 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.ButtonSpinnerShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="Basic button spinner.">
|
||||
<atom:ButtonSpinner Spin="HandleSpin">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Three sizes of Input"
|
||||
Description="There are three sizes of an button spinner: large (40px), default (32px) and small (24px).">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:ButtonSpinner SizeType="Large" Spin="HandleSpin">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
<atom:ButtonSpinner SizeType="Middle" Spin="HandleSpin">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
<atom:ButtonSpinner SizeType="Small" Spin="HandleSpin">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Variants"
|
||||
Description="Variants of Input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:ButtonSpinner Spin="HandleSpin" StyleVariant="Outline">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
<atom:ButtonSpinner Spin="HandleSpin" StyleVariant="Filled">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
<atom:ButtonSpinner Spin="HandleSpin" StyleVariant="Borderless">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Pre / Post tab"
|
||||
Description="Using pre and post tabs example.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
LeftAddOn="http://"
|
||||
RightAddOn=".com"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
RightAddOn="{atom:IconProvider Kind=SettingOutlined}"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
LeftAddOn="http://"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left"
|
||||
InnerRightContent=".com">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="prefix and suffix"
|
||||
Description="Add a prefix or suffix icons inside input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined, NormalFilledColor=#D7D7D7}"
|
||||
InnerRightContent="{atom:IconProvider Kind=InfoCircleOutlined, NormalFilledColor=#8C8C8C}"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
InnerLeftContent="¥"
|
||||
InnerRightContent="RMB"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
InnerLeftContent="¥" InnerRightContent="RMB" IsEnabled="False"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Status"
|
||||
Description="Add status to Input with status, which could be error or warning.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Error"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Warning"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Error"
|
||||
Width="400"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Warning"
|
||||
Width="400"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Error"
|
||||
Width="400"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
HorizontalAlignment="Left"
|
||||
StyleVariant="Filled">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Warning"
|
||||
Width="400"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
HorizontalAlignment="Left"
|
||||
StyleVariant="Filled">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Error"
|
||||
Width="400"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
HorizontalAlignment="Left"
|
||||
StyleVariant="Borderless">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
<atom:ButtonSpinner Spin="HandleSpin"
|
||||
Status="Warning"
|
||||
Width="400"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
HorizontalAlignment="Left"
|
||||
StyleVariant="Borderless">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="床前明月光" />
|
||||
</atom:ButtonSpinner>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,48 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class ButtonSpinnerShowCase : UserControl
|
||||
{
|
||||
public ButtonSpinnerShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void HandleSpin(object sender, SpinEventArgs e)
|
||||
{
|
||||
var spinner = (ButtonSpinner)sender;
|
||||
|
||||
if (spinner.Content is TextBlock textBlock)
|
||||
{
|
||||
var value = Array.IndexOf(_spinnerItems, textBlock.Text);
|
||||
if (e.Direction == SpinDirection.Increase)
|
||||
{
|
||||
value++;
|
||||
}
|
||||
else
|
||||
{
|
||||
value--;
|
||||
}
|
||||
|
||||
if (value < 0)
|
||||
{
|
||||
value = _spinnerItems.Length - 1;
|
||||
}
|
||||
else if (value >= _spinnerItems.Length)
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
|
||||
textBlock.Text = _spinnerItems[value];
|
||||
}
|
||||
}
|
||||
|
||||
private readonly string[] _spinnerItems =
|
||||
{
|
||||
"床前明月光",
|
||||
"疑是地上霜",
|
||||
"举头望明月",
|
||||
"低头思故乡"
|
||||
};
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
<UserControl
|
||||
mc:Ignorable="d"
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.CalendarShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem Description="The simplest usage for Calendar." Title="Basic">
|
||||
<atom:Calendar />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class CalendarShowCase : UserControl
|
||||
{
|
||||
public CalendarShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.CardShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel />
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class CardShowCase : UserControl
|
||||
{
|
||||
public CardShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,125 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.CheckBoxShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCasePanel.Styles>
|
||||
<Style Selector="atom|CheckBox">
|
||||
<Setter Property="Margin" Value="0, 0, 5, 5" />
|
||||
</Style>
|
||||
</desktop:ShowCasePanel.Styles>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="The simplest use.">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="10">
|
||||
<atom:CheckBox>Checkbox</atom:CheckBox>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Disabled"
|
||||
Description="Disabled checkbox.">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="10" Orientation="Vertical">
|
||||
<atom:CheckBox IsChecked="False" IsEnabled="False">UnChecked</atom:CheckBox>
|
||||
<atom:CheckBox IsChecked="{x:Null}" IsEnabled="False">Indeterminate</atom:CheckBox>
|
||||
<atom:CheckBox IsChecked="True" IsEnabled="False">Checked</atom:CheckBox>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Controlled Checkbox"
|
||||
Description="Communicated with other components.">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="10" Orientation="Vertical">
|
||||
<atom:CheckBox IsChecked="{Binding ControlledCheckBoxCheckedStatus}"
|
||||
IsEnabled="{Binding ControlledCheckBoxEnabledStatus}"
|
||||
Command="{Binding CheckBoxHandler}"
|
||||
Content="{Binding ControlledCheckBoxText}" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="10" Margin="0, 10, 0, 0">
|
||||
<atom:Button SizeType="Small" ButtonType="Primary"
|
||||
x:Name="CheckStatusBtn"
|
||||
Command="{Binding CheckStatusHandler}"
|
||||
CommandParameter="{Binding ElementName=CheckStatusBtn}"
|
||||
Text="{Binding CheckStatusBtnText}" />
|
||||
<atom:Button SizeType="Small" ButtonType="Primary"
|
||||
x:Name="EnableStatusBtn"
|
||||
CommandParameter="{Binding ElementName=EnableStatusBtn}"
|
||||
Command="{Binding EnableStatusHandler}"
|
||||
Text="{Binding EnableStatusBtnText}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Checkbox Group"
|
||||
Description="Generate a group of checkboxes from an array.">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="10" Orientation="Vertical">
|
||||
<WrapPanel Margin="0, 0, 0, 10">
|
||||
<atom:CheckBox IsChecked="True">Apple</atom:CheckBox>
|
||||
<atom:CheckBox IsChecked="True">Pear</atom:CheckBox>
|
||||
<atom:CheckBox IsChecked="True">Orange</atom:CheckBox>
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0, 0, 0, 10">
|
||||
<atom:CheckBox>Apple</atom:CheckBox>
|
||||
<atom:CheckBox IsChecked="True">Pear</atom:CheckBox>
|
||||
<atom:CheckBox>Orange</atom:CheckBox>
|
||||
</WrapPanel>
|
||||
<WrapPanel Margin="0, 0, 0, 10">
|
||||
<atom:CheckBox IsChecked="True" IsEnabled="False">Apple</atom:CheckBox>
|
||||
<atom:CheckBox IsEnabled="False">Pear</atom:CheckBox>
|
||||
<atom:CheckBox IsEnabled="False">Orange</atom:CheckBox>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Check all"
|
||||
Description="The indeterminate property can help you to achieve a 'check all' effect.">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Left" Spacing="10">
|
||||
<StackPanel>
|
||||
<atom:CheckBox IsChecked="{Binding CheckedAllStatus}"
|
||||
Command="{Binding CheckedAllStatusHandler}">
|
||||
Check all
|
||||
</atom:CheckBox>
|
||||
</StackPanel>
|
||||
<WrapPanel Margin="0, 20, 0, 0">
|
||||
<atom:CheckBox x:Name="AppleCheckBox"
|
||||
IsChecked="{Binding AppleCheckedStatus}"
|
||||
Command="{Binding CheckedItemStatusHandler}"
|
||||
CommandParameter="{Binding ElementName=AppleCheckBox}">
|
||||
Apple
|
||||
</atom:CheckBox>
|
||||
<atom:CheckBox x:Name="PearCheckBox"
|
||||
IsChecked="{Binding PearCheckedStatus}"
|
||||
Command="{Binding CheckedItemStatusHandler}"
|
||||
CommandParameter="{Binding ElementName=PearCheckBox}">
|
||||
Pear
|
||||
</atom:CheckBox>
|
||||
<atom:CheckBox x:Name="OrangeCheckBox"
|
||||
IsChecked="{Binding OrangeCheckedStatus}"
|
||||
Command="{Binding CheckedItemStatusHandler}"
|
||||
CommandParameter="{Binding ElementName=OrangeCheckBox}">
|
||||
Orange
|
||||
</atom:CheckBox>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Use with Grid"
|
||||
Description="We can use Checkbox and Grid in Checkbox.Group, to implement complex layout.">
|
||||
<Grid ColumnDefinitions="*,*,*" RowDefinitions="Auto,Auto,Auto" Margin="10">
|
||||
<atom:CheckBox Grid.Row="0" Grid.Column="0">A</atom:CheckBox>
|
||||
<atom:CheckBox Grid.Row="0" Grid.Column="1">B</atom:CheckBox>
|
||||
<atom:CheckBox Grid.Row="0" Grid.Column="2">C</atom:CheckBox>
|
||||
<atom:CheckBox Grid.Row="1" Grid.Column="0">D</atom:CheckBox>
|
||||
<atom:CheckBox Grid.Row="1" Grid.Column="1">D</atom:CheckBox>
|
||||
</Grid>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,13 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.ViewModels;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class CheckBoxShowCase : UserControl
|
||||
{
|
||||
public CheckBoxShowCase()
|
||||
{
|
||||
DataContext = new CheckBoxShowCaseModel();
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,250 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.CollapseShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Collapse"
|
||||
Description="By default, any number of panels can be expanded at a time. The first panel is expanded in this example.">
|
||||
<atom:Collapse>
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 3">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Size"
|
||||
Description="Ant Design supports a default collapse size as well as a large and small size.
|
||||
If a large or small collapse is desired, set the size property to either large or small respectively. Omit the size property for a collapse with the default size.">
|
||||
<StackPanel Orientation="Vertical" Spacing="20" Margin="0, 0, 10, 0">
|
||||
<atom:Separator Title="Default Size" TitlePosition="Left" FontWeight="Bold" />
|
||||
<atom:Collapse SizeType="Middle">
|
||||
<atom:CollapseItem Header="This is default size panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
<atom:Separator Title="Small Size" TitlePosition="Left" FontWeight="Bold" />
|
||||
<atom:Collapse SizeType="Small">
|
||||
<atom:CollapseItem Header="This is small size panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
<atom:Separator Title="Large Size" TitlePosition="Left" FontWeight="Bold" />
|
||||
<atom:Collapse SizeType="Large">
|
||||
<atom:CollapseItem Header="This is large size panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Accordion"
|
||||
Description="In accordion mode, only one panel can be expanded at a time.">
|
||||
<atom:Collapse IsAccordion="True">
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 3">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Nested panel"
|
||||
Description="Collapse is nested inside the Collapse." Margin="0, 0, 10, 0">
|
||||
<atom:Collapse>
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<atom:Collapse>
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 3">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Borderless"
|
||||
Description="A borderless style of Collapse." Margin="0, 0, 10, 0">
|
||||
<atom:Collapse IsBorderless="True">
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 3">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="No Arrow"
|
||||
Description="You can hide the arrow icon by passing IsShowExpandIcon={False} to CollapsePanel component."
|
||||
Margin="0, 0, 10, 0">
|
||||
<atom:Collapse>
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2" IsShowExpandIcon="False">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Extra node"
|
||||
Description="Render extra element in the top-right corner of each panel." Margin="0, 0, 10, 0">
|
||||
<StackPanel Orientation="Vertical" Spacing="20">
|
||||
<atom:Collapse ExpandIconPosition="{Binding CollapseExpandIconPosition}">
|
||||
<atom:CollapseItem Header="This is panel header 1"
|
||||
AddOnContent="{atom:IconProvider Kind=SettingOutlined}">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2"
|
||||
AddOnContent="{atom:IconProvider Kind=SettingOutlined}">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 3"
|
||||
AddOnContent="{atom:IconProvider Kind=SettingOutlined}">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<TextBlock VerticalAlignment="Center">Expand Icon Position:</TextBlock>
|
||||
<atom:OptionButtonGroup ButtonStyle="Outline" Name="ExpandButtonPosGroup">
|
||||
<atom:OptionButton IsChecked="True">Start</atom:OptionButton>
|
||||
<atom:OptionButton>End</atom:OptionButton>
|
||||
</atom:OptionButtonGroup>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Ghost Collapse"
|
||||
Description="Making collapse's background to transparent." Margin="0, 0, 10, 0">
|
||||
<atom:Collapse IsGhostStyle="True">
|
||||
<atom:CollapseItem Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 2">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
<atom:CollapseItem Header="This is panel header 3">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Collapsible"
|
||||
Description="Specify the trigger area of collapsible by collapsible." Margin="0, 0, 10, 0">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Collapse>
|
||||
<atom:CollapseItem Header="This panel can only be collapsed by clicking text">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
<atom:Collapse TriggerType="Icon">
|
||||
<atom:CollapseItem Header="This panel can only be collapsed by clicking icon">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
|
||||
<atom:Collapse IsEnabled="False">
|
||||
<atom:CollapseItem Header="This panel can't be collapsed">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
|
||||
<atom:Collapse IsEnabled="False">
|
||||
<atom:CollapseItem Header="This panel can't be collapsed" IsSelected="True">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:CollapseItem>
|
||||
</atom:Collapse>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,36 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class CollapseShowCase : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<CollapseExpandIconPosition> CollapseExpandIconPositionProperty =
|
||||
AvaloniaProperty.Register<CollapseShowCase, CollapseExpandIconPosition>(nameof(CollapseExpandIconPosition));
|
||||
|
||||
public CollapseExpandIconPosition CollapseExpandIconPosition
|
||||
{
|
||||
get => GetValue(CollapseExpandIconPositionProperty);
|
||||
set => SetValue(CollapseExpandIconPositionProperty, value);
|
||||
}
|
||||
|
||||
public CollapseShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
//ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
|
||||
}
|
||||
|
||||
private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
|
||||
{
|
||||
if (args.Index == 0)
|
||||
{
|
||||
CollapseExpandIconPosition = CollapseExpandIconPosition.Start;
|
||||
}
|
||||
else if (args.Index == 1)
|
||||
{
|
||||
CollapseExpandIconPosition = CollapseExpandIconPosition.End;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,229 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.ComboBoxShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="Basic button spinner.">
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="Basic button spinner.">
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Three sizes of Input"
|
||||
Description="There are three sizes of an ComboBox: large (40px), default (32px) and small (24px).">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:ComboBox SizeType="Large" PlaceholderText="Please select">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
<atom:ComboBox SizeType="Middle" PlaceholderText="Please select">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
<atom:ComboBox SizeType="Small" PlaceholderText="Please select">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Variants"
|
||||
Description="Variants of Input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:ComboBox StyleVariant="Outline" PlaceholderText="Please select" Width="300">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox StyleVariant="Filled" PlaceholderText="Please select" Width="300">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox StyleVariant="Borderless" PlaceholderText="Please select" Width="300">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Pre / Post tab"
|
||||
Description="Using pre and post tabs example.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
LeftAddOn="http://"
|
||||
RightAddOn=".com">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
RightAddOn="{atom:IconProvider Kind=SettingOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
LeftAddOn="http://"
|
||||
InnerRightContent=".com">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="prefix and suffix"
|
||||
Description="Add a prefix or suffix icons inside input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined, NormalFilledColor=#D7D7D7}"
|
||||
InnerRightContent="{atom:IconProvider Kind=InfoCircleOutlined, NormalFilledColor=#8C8C8C}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
InnerLeftContent="¥"
|
||||
InnerRightContent="RMB">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
InnerLeftContent="¥"
|
||||
InnerRightContent="RMB" IsEnabled="False">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Status"
|
||||
Description="Add status to Input with status, which could be error or warning.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Error">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Warning">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Error"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Warning"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Error"
|
||||
StyleVariant="Filled"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Warning"
|
||||
StyleVariant="Filled"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Error"
|
||||
StyleVariant="Borderless"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
<atom:ComboBox PlaceholderText="Please select" Width="300"
|
||||
Status="Warning"
|
||||
StyleVariant="Borderless"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}">
|
||||
<atom:ComboBoxItem>床前明月光</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>疑是地上霜</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>举头望明月</atom:ComboBoxItem>
|
||||
<atom:ComboBoxItem>低头思故乡</atom:ComboBoxItem>
|
||||
</atom:ComboBox>
|
||||
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class ComboBoxShowCase : UserControl
|
||||
{
|
||||
public ComboBoxShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class DatePickerShowCase : UserControl
|
||||
{
|
||||
public DatePickerShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.DatePickerShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
xmlns:atom="https://atomui.net"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<!-- <desktop:ShowCaseItem -->
|
||||
<!-- Title="Basic" -->
|
||||
<!-- Description="Click DatePicker, and then we could select or input a date in panel."> -->
|
||||
<!-- <atom:DatePicker Watermark="Select date"/> -->
|
||||
<!-- </desktop:ShowCaseItem> -->
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="With Time Picker"
|
||||
Description="Date selection panel with time selection.">
|
||||
<atom:DatePicker Watermark="Select date" IsShowTime="True" IsNeedConfirm="True" ClockIdentifier="HourClock12"/>
|
||||
</desktop:ShowCaseItem>
|
||||
<!-- -->
|
||||
<!-- <desktop:ShowCaseItem -->
|
||||
<!-- Title="Need Confirm" -->
|
||||
<!-- Description="DatePicker will automatically determine whether to show a confirm button according to the picker property. You can also set the needConfirm property to determine whether to show a confirm button. When needConfirm is set, the user must click the confirm button to complete the selection. Otherwise, the selection will be submitted when the picker loses focus or selects a date."> -->
|
||||
<!-- <atom:DatePicker Watermark="Select date" IsNeedConfirm="True"/> -->
|
||||
<!-- </desktop:ShowCaseItem> -->
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,286 +0,0 @@
|
||||
<UserControl x:Class="AtomUI.Demo.Desktop.ShowCase.DrawerShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:showCase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<UserControl.Styles>
|
||||
<!-- ListBox -->
|
||||
<Style Selector="ListBox">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="ItemsPanel">
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ListBoxItem -->
|
||||
<Style Selector="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="Transparent"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ListBox.PlacementList -->
|
||||
<Style Selector="ListBox.PlacementList">
|
||||
<Setter Property="ItemTemplate">
|
||||
<DataTemplate DataType="atom:DrawerPlacement">
|
||||
<atom:RadioButton Content="{Binding}" IsChecked="{Binding $parent[ListBoxItem].IsSelected}" />
|
||||
</DataTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- StackPanel.ControllerPanel -->
|
||||
<Style Selector="StackPanel.ControllerPanel">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
<Setter Property="Spacing" Value="8" />
|
||||
<Style Selector="^>:is(Control)">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
|
||||
<desktop:ShowCasePanel>
|
||||
|
||||
<!-- Basic -->
|
||||
<desktop:ShowCaseItem Title="Basic" Description="Basic drawer.">
|
||||
<Panel>
|
||||
<atom:ToggleSwitch Content="Open" />
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((atom:ToggleSwitch)Children[0]).IsChecked}" OpenOn="{atom:TopLevel}">
|
||||
<TextBlock Margin="50" Text="Some contents..." />
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- No Mask -->
|
||||
<desktop:ShowCaseItem Title="No Mask" Description="Without a mask.">
|
||||
<Panel>
|
||||
<atom:ToggleSwitch Content="Open" />
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((atom:ToggleSwitch)Children[0]).IsChecked}"
|
||||
OpenOn="{atom:TopLevel}"
|
||||
ShowMask="False">
|
||||
<StackPanel Margin="50" Spacing="8">
|
||||
<TextBlock Text="Some contents..." />
|
||||
<atom:Button Command="{atom:CloseDrawer}" Text="Close" />
|
||||
</StackPanel>
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- Custom Placement -->
|
||||
<desktop:ShowCaseItem Title="Custom Placement" Description="The Drawer can appear from any edge of the screen.">
|
||||
<Panel>
|
||||
<StackPanel Classes="ControllerPanel">
|
||||
<ListBox Classes="PlacementList"
|
||||
ItemsSource="{desktop:Enum atom:DrawerPlacement}"
|
||||
SelectedIndex="2" />
|
||||
<atom:ToggleSwitch Content="Open" />
|
||||
</StackPanel>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((Panel)Children[0]).((atom:ToggleSwitch)Children[1]).IsChecked}"
|
||||
OpenOn="{atom:TopLevel}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<TextBlock Margin="50" Text="Some contents..." />
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- Extra Actions -->
|
||||
<desktop:ShowCaseItem Title="Extra Actions" Description="Extra actions should be placed at corner of drawer in Ant Design, you can use extra prop for that.">
|
||||
<Panel>
|
||||
<StackPanel Classes="ControllerPanel">
|
||||
<ListBox Classes="PlacementList"
|
||||
ItemsSource="{desktop:Enum atom:DrawerPlacement}"
|
||||
SelectedIndex="2" />
|
||||
<atom:ToggleSwitch Content="Open Confirm Drawer" />
|
||||
<atom:ToggleSwitch Content="Open Submit Drawer" />
|
||||
</StackPanel>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((Panel)Children[0]).((atom:ToggleSwitch)Children[1]).IsChecked}"
|
||||
OpenOn="{atom:TopLevel}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<atom:ConfirmDrawerFrame ConfirmCommand="{atom:Toast Text=Drawer Confirmed!, Header=Tips}" Header="Drawer with extra actions">
|
||||
<TextBlock Margin="50" Text="Some contents..." />
|
||||
</atom:ConfirmDrawerFrame>
|
||||
</atom:Drawer>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((Panel)Children[0]).((atom:ToggleSwitch)Children[2]).IsChecked}"
|
||||
OpenOn="{atom:TopLevel}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<atom:SubmitDrawerFrame ConfirmCommand="{atom:Toast Text=Drawer Confirmed!, Header=Tips}" Header="Drawer with extra actions">
|
||||
<TextBlock Margin="50" Text="Some contents..." />
|
||||
</atom:SubmitDrawerFrame>
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- Render in current area -->
|
||||
<desktop:ShowCaseItem Title="Render in current area" Description="Render in current area.">
|
||||
<Panel>
|
||||
<StackPanel Height="120" Classes="ControllerPanel">
|
||||
<ListBox Classes="PlacementList"
|
||||
ItemsSource="{desktop:Enum atom:DrawerPlacement}"
|
||||
SelectedIndex="2" />
|
||||
<atom:ToggleSwitch Content="Open" />
|
||||
</StackPanel>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((Panel)Children[0]).((atom:ToggleSwitch)Children[1]).IsChecked}"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<TextBlock Margin="50" Text=" Some contents... " />
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- Multi-level drawer - Overlay -->
|
||||
<desktop:ShowCaseItem Title="Multi-level drawer - Overlay" Description="Open a new drawer on top of an existing drawer to handle multi branch tasks.">
|
||||
<Panel>
|
||||
<StackPanel Height="120" Classes="ControllerPanel">
|
||||
<ListBox Classes="PlacementList"
|
||||
ItemsSource="{desktop:Enum atom:DrawerPlacement}"
|
||||
SelectedIndex="2" />
|
||||
<atom:ToggleSwitch Content="Open #1" />
|
||||
</StackPanel>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((Panel)Children[0]).((atom:ToggleSwitch)Children[1]).IsChecked}"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<StackPanel MinWidth="220" Margin="50">
|
||||
<TextBlock Foreground="Green" Text=" Some contents #1... " />
|
||||
<atom:ToggleSwitch x:Name="ToggleSwitchOpenDrawer2" Content="Open #2" />
|
||||
</StackPanel>
|
||||
</atom:Drawer>
|
||||
<atom:Drawer IsOpen="{Binding #ToggleSwitchOpenDrawer2.IsChecked}"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<StackPanel MinWidth="160" Margin="50">
|
||||
<TextBlock Foreground="Yellow" Text=" Some contents #2... " />
|
||||
<atom:ToggleSwitch x:Name="ToggleSwitchOpenDrawer3" Content="Open #3" />
|
||||
</StackPanel>
|
||||
</atom:Drawer>
|
||||
<atom:Drawer IsOpen="{Binding #ToggleSwitchOpenDrawer3.IsChecked}"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<TextBlock MinWidth="300"
|
||||
Margin="50"
|
||||
Foreground="DodgerBlue"
|
||||
Text=" Some contents #3... " />
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- Multi-level drawer - Push -->
|
||||
<desktop:ShowCaseItem Title="Multi-level drawer - Push" Description="Open a new drawer on top of an existing drawer to handle multi branch tasks.">
|
||||
<Panel>
|
||||
<StackPanel Height="120" Classes="ControllerPanel">
|
||||
<ListBox Classes="PlacementList"
|
||||
ItemsSource="{desktop:Enum atom:DrawerPlacement}"
|
||||
SelectedIndex="2" />
|
||||
<atom:ToggleSwitch Content="Open #1" />
|
||||
</StackPanel>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding $parent[Panel].((Panel)Children[0]).((atom:ToggleSwitch)Children[1]).IsChecked}"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<StackPanel Margin="50">
|
||||
<TextBlock Foreground="Green" Text="Drawer with Overlay OpenMode #1... " />
|
||||
<atom:ToggleSwitch x:Name="ToggleSwitchOpenDrawer4" Content="Open #2" />
|
||||
</StackPanel>
|
||||
</atom:Drawer>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding #ToggleSwitchOpenDrawer4.IsChecked}"
|
||||
OpenMode="Push"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<StackPanel Margin="50">
|
||||
<TextBlock Foreground="Red" Text="Drawer with Push OpenMode #2... " />
|
||||
<atom:ToggleSwitch x:Name="ToggleSwitchOpenDrawer5" Content="Open #3" />
|
||||
</StackPanel>
|
||||
</atom:Drawer>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding #ToggleSwitchOpenDrawer5.IsChecked}"
|
||||
OpenMode="Overlay"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<StackPanel Margin="50">
|
||||
<TextBlock Foreground="DeepPink" Text="Drawer with Overlay OpenMode #2... " />
|
||||
<atom:ToggleSwitch x:Name="ToggleSwitchOpenDrawer6" Content="Open #3" />
|
||||
</StackPanel>
|
||||
</atom:Drawer>
|
||||
|
||||
<atom:Drawer IsOpen="{Binding #ToggleSwitchOpenDrawer6.IsChecked}"
|
||||
OpenMode="Push"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding $parent[Panel].((Panel)Children[0]).((ListBox)Children[0]).SelectedItem}">
|
||||
<TextBlock Margin="50"
|
||||
Foreground="DodgerBlue"
|
||||
Text="Drawer with Push Push #4... " />
|
||||
</atom:Drawer>
|
||||
</Panel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<!-- Open on a target element -->
|
||||
<desktop:ShowCaseItem Title="Open on a target element" Description="Drawer can be opened on a special target element by property OpenOn.">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<Border Grid.ColumnSpan="2" Height="300" />
|
||||
<StackPanel Grid.Column="0" Spacing="8">
|
||||
<atom:CheckBox x:Name="ToggleButton1"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Content="Open Drawer #1" />
|
||||
<atom:CheckBox x:Name="ToggleButton2"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Content="Open Drawer #2" />
|
||||
<ListBox x:Name="CbxHorizontalAlignment"
|
||||
Classes="PlacementList"
|
||||
ItemsSource="{desktop:Enum atom:DrawerPlacement}"
|
||||
SelectedIndex="2" />
|
||||
<atom:Button Click="ButtonOpenOnCurrentParent_OnClick" Content="Open On Current's Parent" />
|
||||
</StackPanel>
|
||||
|
||||
<atom:Drawer x:Name="Drawer1"
|
||||
Grid.Column="1"
|
||||
Background="Gray"
|
||||
IsOpen="{Binding #ToggleButton1.IsChecked}"
|
||||
OpenOn="{Binding $parent[desktop:ShowCaseItem]}"
|
||||
Placement="{Binding #CbxHorizontalAlignment.SelectedItem}"
|
||||
ShowMask="True">
|
||||
<atom:Button Margin="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
ButtonType="Primary"
|
||||
Click="Button_OnClick"
|
||||
Text="Button #1" />
|
||||
</atom:Drawer>
|
||||
|
||||
<atom:Drawer x:Name="Drawer2"
|
||||
Grid.Column="1"
|
||||
Background="Gray"
|
||||
IsOpen="{Binding #ToggleButton2.IsChecked}"
|
||||
Placement="{Binding #CbxHorizontalAlignment.SelectedItem}"
|
||||
ShowMask="True">
|
||||
<atom:Button Margin="16"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
ButtonType="Text"
|
||||
Click="Button_OnClick"
|
||||
Text="Button #2" />
|
||||
</atom:Drawer>
|
||||
</Grid>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,35 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Button = AtomUI.Controls.Button;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class DrawerShowCase : UserControl
|
||||
{
|
||||
public DrawerShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Button_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is not Button button)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Drawer.GetDrawer(button) is not { } drawer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
drawer.IsOpen = false;
|
||||
}
|
||||
|
||||
private void ButtonOpenOnCurrentParent_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
Drawer1.OpenOn = Drawer1.OpenOn?.Parent as Visual;
|
||||
}
|
||||
}
|
@ -1,299 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.DropdownButtonShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="The most basic dropdown menu.">
|
||||
<atom:DropdownButton ButtonType="Link" TriggerType="Hover" x:Name="Test">
|
||||
Hover me
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C" Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
<atom:MenuItem Header="Paste">
|
||||
<atom:MenuItem Header="Paste" InputGesture="Ctrl+P"
|
||||
Icon="{atom:IconProvider Kind=FileDoneOutlined}" />
|
||||
<atom:MenuItem Header="Paste from History" InputGesture="Ctrl+Shift+V" />
|
||||
</atom:MenuItem>
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Button Types"
|
||||
Description="Support centralized button type.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:DropdownButton ButtonType="Primary" TriggerType="Click">
|
||||
Edit File
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Primary" Shape="Round" TriggerType="Click">
|
||||
Edit File
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Click">
|
||||
Edit File
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Text" TriggerType="Click">
|
||||
Edit File
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Arrow"
|
||||
Description="You could display an arrow.">
|
||||
<desktop:ShowCaseItem.Styles>
|
||||
<Style Selector="atom|DropdownButton">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</desktop:ShowCaseItem.Styles>
|
||||
<WrapPanel>
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover" IsShowArrow="True"
|
||||
Placement="BottomEdgeAlignedLeft">
|
||||
BottomLeft
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover" IsShowArrow="True"
|
||||
Placement="Bottom">
|
||||
Bottom
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover" IsShowArrow="True"
|
||||
Placement="BottomEdgeAlignedRight">
|
||||
BottomRight
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover" IsShowArrow="True"
|
||||
Placement="TopEdgeAlignedLeft">
|
||||
TopLeft
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover" IsShowArrow="True"
|
||||
Placement="Top">
|
||||
Top
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover" IsShowArrow="True"
|
||||
Placement="TopEdgeAlignedRight">
|
||||
TopRight
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
</WrapPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Placement"
|
||||
Description="Support 6 placements.">
|
||||
<desktop:ShowCaseItem.Styles>
|
||||
<Style Selector="atom|DropdownButton">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</desktop:ShowCaseItem.Styles>
|
||||
<WrapPanel>
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover"
|
||||
Placement="BottomEdgeAlignedLeft">
|
||||
BottomLeft
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover"
|
||||
Placement="Bottom">
|
||||
Bottom
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover"
|
||||
Placement="BottomEdgeAlignedRight">
|
||||
BottomRight
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover"
|
||||
Placement="TopEdgeAlignedLeft">
|
||||
TopLeft
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover"
|
||||
Placement="Top">
|
||||
Top
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
|
||||
<atom:DropdownButton ButtonType="Default" TriggerType="Hover"
|
||||
Placement="TopEdgeAlignedRight">
|
||||
TopRight
|
||||
<atom:DropdownButton.DropdownFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C"
|
||||
Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
</atom:MenuFlyout>
|
||||
</atom:DropdownButton.DropdownFlyout>
|
||||
</atom:DropdownButton>
|
||||
</WrapPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class DropdownButtonShowCase : UserControl
|
||||
{
|
||||
public DropdownButtonShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.EmptyShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="Simplest Usage.">
|
||||
<atom:EmptyIndicator PresetImage="Default" />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Size"
|
||||
Description="AtomUI supports three sizes of buttons: small, default and large.">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:EmptyIndicator PresetImage="Simple" SizeType="Small" />
|
||||
<atom:EmptyIndicator PresetImage="Simple" SizeType="Middle" />
|
||||
<atom:EmptyIndicator PresetImage="Simple" SizeType="Large" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Customize"
|
||||
Description="Customize image source, image size, description and extra content.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:EmptyIndicator ImagePath="avares://AtomUI.Demo.Desktop/Assets/EmptyShowCase/empty.svg"
|
||||
SizeType="Large"
|
||||
Description="Customize Description" />
|
||||
<atom:Button HorizontalAlignment="Center" ButtonType="Primary">Create Now</atom:Button>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="No description"
|
||||
Description="Simplest Usage with no description.">
|
||||
<atom:EmptyIndicator PresetImage="Default" IsShowDescription="False" />
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class EmptyShowCase : UserControl
|
||||
{
|
||||
public EmptyShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,168 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.ExpanderShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Expander"
|
||||
Description="By default, The simplest usage is to expand downward.">
|
||||
<atom:Expander Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Size"
|
||||
Description="Ant Design supports a default Expander size as well as a large and small size.
|
||||
If a large or small Expander is desired, set the size property to either large or small respectively. Omit the size property for a Expander with the default size.">
|
||||
<StackPanel Orientation="Vertical" Spacing="20" Margin="0, 0, 10, 0">
|
||||
<atom:Separator Title="Default Size" TitlePosition="Left" FontWeight="Bold" />
|
||||
<atom:Expander SizeType="Middle" Header="This is default size panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
<atom:Separator Title="Small Size" TitlePosition="Left" FontWeight="Bold" />
|
||||
<atom:Expander SizeType="Small" Header="This is small size panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
<atom:Separator Title="Large Size" TitlePosition="Left" FontWeight="Bold" />
|
||||
<atom:Expander SizeType="Large" Header="This is large size panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Expanding Direction"
|
||||
Description="The content area supports expansion in four directions.">
|
||||
<DockPanel Margin="0, 0, 0, 0" Height="300">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" DockPanel.Dock="Top">
|
||||
<TextBlock VerticalAlignment="Center">Expand direction:</TextBlock>
|
||||
<atom:OptionButtonGroup ButtonStyle="Outline" Name="ExpandDirectionOptionGroup">
|
||||
<atom:OptionButton IsChecked="True">Down</atom:OptionButton>
|
||||
<atom:OptionButton>Up</atom:OptionButton>
|
||||
<atom:OptionButton>Left</atom:OptionButton>
|
||||
<atom:OptionButton>Right</atom:OptionButton>
|
||||
</atom:OptionButtonGroup>
|
||||
</StackPanel>
|
||||
|
||||
<Panel Margin="0, 20, 0, 0">
|
||||
<atom:Expander Header="This is panel header" ExpandDirection="{Binding ExpandDirection}"
|
||||
Name="DirectionDemoExpander">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Nested panel"
|
||||
Description="Expander is nested inside the Collapse." Margin="0, 0, 10, 0">
|
||||
<atom:Expander Header="This is panel header 1">
|
||||
<atom:Expander Header="This is nested panel header">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</atom:Expander>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Borderless"
|
||||
Description="A borderless style of Expander." Margin="0, 0, 10, 0">
|
||||
<atom:Expander IsBorderless="True" Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="No Arrow"
|
||||
Description="You can hide the arrow icon by passing IsShowExpandIcon={False} to CollapsePanel component."
|
||||
Margin="0, 0, 10, 0">
|
||||
<atom:Expander Header="This is panel header 1" IsShowExpandIcon="False">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Extra node"
|
||||
Description="Render extra element in the top-right corner of each panel." Margin="0, 0, 10, 0">
|
||||
<StackPanel Orientation="Vertical" Spacing="20">
|
||||
<atom:Expander Header="This is panel header 1"
|
||||
AddOnContent="{atom:IconProvider Kind=SettingOutlined}"
|
||||
ExpandIconPosition="{Binding ToggleIconPosition}">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<TextBlock VerticalAlignment="Center">Expand Icon Position:</TextBlock>
|
||||
<atom:OptionButtonGroup ButtonStyle="Outline" Name="ExpandButtonPosGroup">
|
||||
<atom:OptionButton IsChecked="True">Start</atom:OptionButton>
|
||||
<atom:OptionButton>End</atom:OptionButton>
|
||||
</atom:OptionButtonGroup>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Ghost Collapse"
|
||||
Description="Making collapse's background to transparent." Margin="0, 0, 10, 0">
|
||||
<atom:Expander IsGhostStyle="True" Header="This is panel header 1">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Collapsible"
|
||||
Description="Specify the trigger area of collapsible by collapsible." Margin="0, 0, 10, 0">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Expander Header="This panel can only be collapsed by clicking text">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
<atom:Expander TriggerType="Icon" Header="This panel can only be collapsed by clicking icon">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
|
||||
<atom:Expander IsEnabled="False" Header="This panel can't be collapsed">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
|
||||
<atom:Expander IsEnabled="False" Header="This panel can't be collapsed" IsExpanded="True">
|
||||
<TextBlock TextWrapping="Wrap">
|
||||
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
|
||||
</TextBlock>
|
||||
</atom:Expander>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,66 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class ExpanderShowCase : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<ExpanderIconPosition> ToggleIconPositionProperty =
|
||||
AvaloniaProperty.Register<ExpanderShowCase, ExpanderIconPosition>(nameof(ToggleIconPosition));
|
||||
|
||||
public ExpanderIconPosition ToggleIconPosition
|
||||
{
|
||||
get => GetValue(ToggleIconPositionProperty);
|
||||
set => SetValue(ToggleIconPositionProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<ExpandDirection> ExpandDirectionProperty =
|
||||
AvaloniaProperty.Register<ExpanderShowCase, ExpandDirection>(nameof(ExpandDirection));
|
||||
|
||||
public ExpandDirection ExpandDirection
|
||||
{
|
||||
get => GetValue(ExpandDirectionProperty);
|
||||
set => SetValue(ExpandDirectionProperty, value);
|
||||
}
|
||||
|
||||
public ExpanderShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = this;
|
||||
ExpandButtonPosGroup.OptionCheckedChanged += HandleExpandButtonPosOptionCheckedChanged;
|
||||
ExpandDirectionOptionGroup.OptionCheckedChanged += HandleExpandDirectionOptionCheckedChanged;
|
||||
}
|
||||
|
||||
private void HandleExpandButtonPosOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
|
||||
{
|
||||
if (args.Index == 0)
|
||||
{
|
||||
ToggleIconPosition = ExpanderIconPosition.Start;
|
||||
}
|
||||
else if (args.Index == 1)
|
||||
{
|
||||
ToggleIconPosition = ExpanderIconPosition.End;
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleExpandDirectionOptionCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
|
||||
{
|
||||
if (args.Index == 0)
|
||||
{
|
||||
ExpandDirection = ExpandDirection.Down;
|
||||
}
|
||||
else if (args.Index == 1)
|
||||
{
|
||||
ExpandDirection = ExpandDirection.Up;
|
||||
}
|
||||
else if (args.Index == 2)
|
||||
{
|
||||
ExpandDirection = ExpandDirection.Left;
|
||||
}
|
||||
else if (args.Index == 3)
|
||||
{
|
||||
ExpandDirection = ExpandDirection.Right;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.GroupBoxShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="Basic usage of the GroupBox control.">
|
||||
<atom:GroupBox HeaderTitle="Title Info">
|
||||
<Panel Height="100">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Header title Position"
|
||||
Description="GroupBox Header supports three position types: Left, Center and Right.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:GroupBox HeaderTitle="Title Info">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderTitlePosition="Center">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderTitlePosition="Right">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Header title style"
|
||||
Description="GroupBox Header supports customizing some properties of color and font.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderFontStyle="Italic">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderTitlePosition="Center" HeaderFontWeight="Bold">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderTitlePosition="Right" HeaderFontStyle="Oblique">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderTitlePosition="Center" HeaderFontStyle="Oblique"
|
||||
HeaderTitleColor="Coral" HeaderFontWeight="Medium">
|
||||
<Panel Height="40">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Header Icon"
|
||||
Description="GroupBox Header supports specifying Icon.">
|
||||
<atom:GroupBox HeaderTitle="Title Info" HeaderIcon="{atom:IconProvider Kind=GithubOutlined}">
|
||||
<Panel Height="100">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
Content of group box
|
||||
</TextBlock>
|
||||
</Panel>
|
||||
</atom:GroupBox>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class GroupBoxShowCase : UserControl
|
||||
{
|
||||
public GroupBoxShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
<UserControl x:Class="AtomUI.Demo.Desktop.ShowCase.IconShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
<viewModels:PaletteDemoViewModel />
|
||||
</Design.DataContext>
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="../Controls/PathIcon/IconInfoItem.axaml" />
|
||||
<ResourceInclude Source="../Controls/PathIcon/IconGallery.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<TabControl>
|
||||
<TabItem Header="Outlined">
|
||||
<ScrollViewer>
|
||||
<controls:IconGallery IconThemeType="Outlined" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Filled">
|
||||
<ScrollViewer>
|
||||
<controls:IconGallery IconThemeType="Filled" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Two Tone">
|
||||
<ScrollViewer>
|
||||
<controls:IconGallery IconThemeType="TwoTone" />
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UserControl>
|
@ -1,22 +0,0 @@
|
||||
using AtomUI.Demo.Desktop.ViewModels;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Threading;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class IconShowCase : UserControl
|
||||
{
|
||||
public IconShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override async void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
var vm = new PaletteDemoViewModel();
|
||||
await Dispatcher.UIThread.InvokeAsync(() => { vm.InitializeResources(); });
|
||||
DataContext = vm;
|
||||
}
|
||||
}
|
@ -1,379 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.InfoFlyoutShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="The most basic example. The size of the floating layer depends on the contents region.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:FlyoutHost Trigger="Hover">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button ButtonType="Primary">Hover me</atom:Button>
|
||||
</atom:FlyoutHost>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Three ways to trigger"
|
||||
Description="Mouse to click, focus and move in.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:FlyoutHost Trigger="Hover">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button>Hover me</atom:Button>
|
||||
</atom:FlyoutHost>
|
||||
<atom:FlyoutHost Trigger="Click">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button>Click me</atom:Button>
|
||||
</atom:FlyoutHost>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Placement"
|
||||
Description="There are 12 placement options available.">
|
||||
<Grid>
|
||||
<Grid.Styles>
|
||||
<Style Selector="atom|Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Width" Value="80" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="1" Grid.Column="0" Trigger="Hover" Placement="LeftEdgeAlignedTop">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="LT" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="2" Grid.Column="0" Trigger="Hover" Placement="Left">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Left" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="3" Grid.Column="0" Trigger="Hover" Placement="LeftEdgeAlignedBottom">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="LB" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="0" Grid.Column="1" Trigger="Hover" Placement="TopEdgeAlignedLeft">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="TL" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="0" Grid.Column="2" Trigger="Hover" Placement="Top">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Top" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="0" Grid.Column="3" Trigger="Hover" Placement="TopEdgeAlignedRight">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="TR" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="1" Grid.Column="4" Trigger="Hover" Placement="RightEdgeAlignedTop">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="RT" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="2" Grid.Column="4" Trigger="Hover" Placement="Right">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Right" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="3" Grid.Column="4" Trigger="Hover" Placement="RightEdgeAlignedBottom">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="RB" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="4" Grid.Column="1" Trigger="Hover" Placement="BottomEdgeAlignedLeft">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="BL" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="4" Grid.Column="2" Trigger="Hover" Placement="Bottom">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Bottom" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="4" Grid.Column="3" Trigger="Hover" Placement="BottomEdgeAlignedRight">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="BR" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
</Grid>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Arrow"
|
||||
Description="Support show, hide or keep arrow in the center.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:Segmented x:Name="ArrowSegmented">
|
||||
<atom:SegmentedItem>Show</atom:SegmentedItem>
|
||||
<atom:SegmentedItem>Hide</atom:SegmentedItem>
|
||||
<atom:SegmentedItem>Center</atom:SegmentedItem>
|
||||
</atom:Segmented>
|
||||
<Grid>
|
||||
<Grid.Styles>
|
||||
<Style Selector="atom|Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<Setter Property="Width" Value="80" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<atom:FlyoutHost Grid.Row="1" Grid.Column="0"
|
||||
Trigger="Hover"
|
||||
Placement="LeftEdgeAlignedTop"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="LT" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="2" Grid.Column="0"
|
||||
Trigger="Hover"
|
||||
Placement="Left"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Left" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="3" Grid.Column="0"
|
||||
Trigger="Hover"
|
||||
Placement="LeftEdgeAlignedBottom"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="LB" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="0" Grid.Column="1"
|
||||
Trigger="Hover"
|
||||
Placement="TopEdgeAlignedLeft"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="TL" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="0" Grid.Column="2"
|
||||
Trigger="Hover"
|
||||
Placement="Top"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Top" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="0" Grid.Column="3"
|
||||
Trigger="Hover"
|
||||
Placement="TopEdgeAlignedRight"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="TR" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="1" Grid.Column="4"
|
||||
Trigger="Hover"
|
||||
Placement="RightEdgeAlignedTop"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="RT" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="2" Grid.Column="4"
|
||||
Trigger="Hover"
|
||||
Placement="Right"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Right" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="3" Grid.Column="4"
|
||||
Trigger="Hover"
|
||||
Placement="RightEdgeAlignedBottom"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="RB" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="4" Grid.Column="1"
|
||||
Trigger="Hover"
|
||||
Placement="BottomEdgeAlignedLeft"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="BL" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="4" Grid.Column="2"
|
||||
Trigger="Hover"
|
||||
Placement="Bottom"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="Bottom" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
<atom:FlyoutHost Grid.Row="4" Grid.Column="3"
|
||||
Trigger="Hover"
|
||||
Placement="BottomEdgeAlignedRight"
|
||||
IsShowArrow="{Binding ShowArrow}"
|
||||
IsPointAtCenter="{Binding IsPointAtCenter}">
|
||||
<atom:FlyoutHost.Flyout>
|
||||
<atom:Flyout>
|
||||
<TextBlock Width="200" Height="100" Padding="20">The most basic example.</TextBlock>
|
||||
</atom:Flyout>
|
||||
</atom:FlyoutHost.Flyout>
|
||||
<atom:Button Text="BR" />
|
||||
</atom:FlyoutHost>
|
||||
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,54 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class InfoFlyoutShowCase : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<bool> ShowArrowProperty =
|
||||
AvaloniaProperty.Register<TooltipShowCase, bool>(nameof(ShowArrow), true);
|
||||
|
||||
public static readonly StyledProperty<bool> IsPointAtCenterProperty =
|
||||
AvaloniaProperty.Register<TooltipShowCase, bool>(nameof(IsPointAtCenter));
|
||||
|
||||
private readonly Segmented _segmented;
|
||||
|
||||
public bool ShowArrow
|
||||
{
|
||||
get => GetValue(ShowArrowProperty);
|
||||
set => SetValue(ShowArrowProperty, value);
|
||||
}
|
||||
|
||||
public bool IsPointAtCenter
|
||||
{
|
||||
get => GetValue(IsPointAtCenterProperty);
|
||||
set => SetValue(IsPointAtCenterProperty, value);
|
||||
}
|
||||
|
||||
public InfoFlyoutShowCase()
|
||||
{
|
||||
DataContext = this;
|
||||
InitializeComponent();
|
||||
var control = this as Control;
|
||||
_segmented = control.FindControl<Segmented>("ArrowSegmented")!;
|
||||
_segmented.SelectionChanged += (sender, args) =>
|
||||
{
|
||||
if (_segmented.SelectedIndex == 0)
|
||||
{
|
||||
ShowArrow = true;
|
||||
IsPointAtCenter = false;
|
||||
}
|
||||
else if (_segmented.SelectedIndex == 1)
|
||||
{
|
||||
ShowArrow = false;
|
||||
IsPointAtCenter = false;
|
||||
}
|
||||
else if (_segmented.SelectedIndex == 2)
|
||||
{
|
||||
IsPointAtCenter = true;
|
||||
ShowArrow = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -1,150 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.LineEditShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic usage"
|
||||
Description="Basic usage example.">
|
||||
<atom:LineEdit Watermark="Basic usage" />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Three sizes of Input"
|
||||
Description="There are three sizes of an Input box: large (40px), default (32px) and small (24px).">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:LineEdit Watermark="Large" SizeType="Large"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined}" />
|
||||
<atom:LineEdit Watermark="Middle" SizeType="Middle"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined}" />
|
||||
<atom:LineEdit Watermark="Small" SizeType="Small"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined}" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Variants"
|
||||
Description="Variants of Input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:LineEdit Watermark="Outlined" StyleVariant="Outline" />
|
||||
<atom:LineEdit Watermark="Filled" StyleVariant="Filled" />
|
||||
<atom:LineEdit Watermark="Borderless" StyleVariant="Borderless" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Pre / Post tab"
|
||||
Description="Using pre and post tabs example.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:LineEdit LeftAddOn="http://" RightAddOn=".com" Width="400" HorizontalAlignment="Left"
|
||||
Text="mysite" />
|
||||
<atom:LineEdit RightAddOn="{atom:IconProvider Kind=SettingOutlined}" Width="400"
|
||||
HorizontalAlignment="Left"
|
||||
Text="mysite" />
|
||||
<atom:LineEdit LeftAddOn="http://" InnerRightContent=".com" Width="400" HorizontalAlignment="Left"
|
||||
Text="mysite" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="With clear icon"
|
||||
Description="Input box with the remove icon, click the icon to delete everything.">
|
||||
<atom:LineEdit Watermark="input with clear icon" Width="400" HorizontalAlignment="Left"
|
||||
IsEnableClearButton="True" />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Password box"
|
||||
Description="Input type of password.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:LineEdit Watermark="input password"
|
||||
Width="400"
|
||||
PasswordChar="*"
|
||||
RevealPassword="False"
|
||||
HorizontalAlignment="Left"
|
||||
IsEnableRevealButton="True" />
|
||||
<atom:LineEdit Watermark="input password"
|
||||
Width="400"
|
||||
PasswordChar="*"
|
||||
RevealPassword="False"
|
||||
HorizontalAlignment="Left"
|
||||
IsEnableRevealButton="True"
|
||||
IsEnableClearButton="True" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="prefix and suffix"
|
||||
Description="Add a prefix or suffix icons inside input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:LineEdit Watermark="Enter your username"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined, NormalFilledColor=#D7D7D7}"
|
||||
InnerRightContent="{atom:IconProvider Kind=InfoCircleOutlined, NormalFilledColor=#8C8C8C}" />
|
||||
<atom:LineEdit InnerLeftContent="¥" InnerRightContent="RMB" />
|
||||
<atom:LineEdit InnerLeftContent="¥" InnerRightContent="RMB" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Status"
|
||||
Description="Add status to Input with status, which could be error or warning.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:LineEdit Watermark="Error" Status="Error" />
|
||||
<atom:LineEdit Watermark="Warning" Status="Warning" />
|
||||
<atom:LineEdit Watermark="Error with prefix"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" Status="Error" />
|
||||
<atom:LineEdit Watermark="Warning with prefix"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" Status="Warning" />
|
||||
|
||||
<atom:LineEdit Watermark="Error" Status="Error"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" StyleVariant="Filled" />
|
||||
<atom:LineEdit Watermark="Warning" Status="Warning"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" StyleVariant="Filled" />
|
||||
|
||||
<atom:LineEdit Watermark="Error" Status="Error"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
StyleVariant="Borderless" />
|
||||
<atom:LineEdit Watermark="Warning" Status="Warning"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
StyleVariant="Borderless" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Search box"
|
||||
Description="Example of creating a search box by grouping a standard input with a search button.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:SearchEdit Watermark="input search text" Width="400" HorizontalAlignment="Left" />
|
||||
<atom:SearchEdit Watermark="input search text" Width="400" HorizontalAlignment="Left"
|
||||
SearchButtonText="Search" />
|
||||
|
||||
<atom:SearchEdit Watermark="input search text" Width="400" HorizontalAlignment="Left"
|
||||
SearchButtonStyle="Primary" SearchButtonText="Search" />
|
||||
<atom:SearchEdit Watermark="input search text" Width="400" HorizontalAlignment="Left"
|
||||
SearchButtonStyle="Primary" SearchButtonText="Search" />
|
||||
|
||||
<atom:SearchEdit Watermark="input search text"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left"
|
||||
SearchButtonStyle="Primary"
|
||||
SearchButtonText="Search"
|
||||
IsEnableClearButton="True" />
|
||||
<atom:SearchEdit Watermark="input search text"
|
||||
Width="400"
|
||||
HorizontalAlignment="Left"
|
||||
SearchButtonStyle="Primary"
|
||||
SearchButtonText="搜索一下"
|
||||
InnerRightContent="{atom:IconProvider Kind=AudioOutlined, NormalFilledColor=#1677ff, Width=16, Height=16}"
|
||||
IsEnableClearButton="True"
|
||||
SizeType="Large" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class LineEditShowCase : UserControl
|
||||
{
|
||||
public LineEditShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.ListBoxShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic usage"
|
||||
Description="Basic usage example.">
|
||||
<atom:ListBox>
|
||||
<atom:ListBoxItem>Blue</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Green</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Red</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Yellow</atom:ListBoxItem>
|
||||
</atom:ListBox>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Hover effect"
|
||||
Description="Disabled item hover effect.">
|
||||
<atom:ListBox DisabledItemHoverEffect="True">
|
||||
<atom:ListBoxItem>Blue</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Green</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Red</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Yellow</atom:ListBoxItem>
|
||||
</atom:ListBox>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Item disabled"
|
||||
Description="Disabled item.">
|
||||
<atom:ListBox>
|
||||
<atom:ListBoxItem>Blue</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Green</atom:ListBoxItem>
|
||||
<atom:ListBoxItem IsEnabled="False">Red</atom:ListBoxItem>
|
||||
<atom:ListBoxItem>Yellow</atom:ListBoxItem>
|
||||
</atom:ListBox>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class ListBoxShowCase : UserControl
|
||||
{
|
||||
public ListBoxShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.LoadingIndicatorShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic Usage"
|
||||
Description="A simple loading status.">
|
||||
<atom:LoadingIndicator />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Size"
|
||||
Description="A small LoadingIndicator is used for loading text, default sized LoadingIndicator for loading a card-level block, and large LoadingIndicator used for loading a page.">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:LoadingIndicator SizeType="Small" VerticalAlignment="Center" />
|
||||
<atom:LoadingIndicator SizeType="Middle" VerticalAlignment="Center" />
|
||||
<atom:LoadingIndicator SizeType="Large" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Custom spinning indicator"
|
||||
Description="Use custom loading indicator.">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<atom:LoadingIndicator SizeType="Small"
|
||||
VerticalAlignment="Center"
|
||||
CustomIndicatorIcon="{atom:IconProvider Kind=LoadingOutlined,NormalFilledColor=#1677ff}" />
|
||||
<atom:LoadingIndicator SizeType="Middle"
|
||||
VerticalAlignment="Center"
|
||||
CustomIndicatorIcon="{atom:IconProvider Kind=LoadingOutlined,NormalFilledColor=#1677ff}" />
|
||||
<atom:LoadingIndicator SizeType="Large"
|
||||
VerticalAlignment="Center"
|
||||
CustomIndicatorIcon="{atom:IconProvider Kind=LoadingOutlined,NormalFilledColor=#1677ff}" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Customized description"
|
||||
Description="Customized description">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:LoadingMaskHost IsLoading="True" SizeType="Small"
|
||||
IsShowLoadingMsg="True"
|
||||
LoadingMsg="Loading...">
|
||||
<Border Width="100" Height="100" Background="rgb(251, 251, 251)" />
|
||||
</atom:LoadingMaskHost>
|
||||
<atom:LoadingMaskHost IsLoading="True" SizeType="Middle"
|
||||
IsShowLoadingMsg="True"
|
||||
LoadingMsg="Loading...">
|
||||
<Border Width="100" Height="100" Background="rgb(251, 251, 251)" />
|
||||
</atom:LoadingMaskHost>
|
||||
<atom:LoadingMaskHost IsLoading="True" SizeType="Large"
|
||||
IsShowLoadingMsg="True"
|
||||
LoadingMsg="Loading...">
|
||||
<Border Width="100" Height="100" Background="rgb(251, 251, 251)" />
|
||||
</atom:LoadingMaskHost>
|
||||
</StackPanel>
|
||||
<atom:LoadingMaskHost IsLoading="True"
|
||||
IsShowLoadingMsg="True"
|
||||
LoadingMsg="Loading...">
|
||||
<atom:Alert Message="Alert message title"
|
||||
Description="Further details about the context of this alert."
|
||||
Type="Info" />
|
||||
</atom:LoadingMaskHost>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Customized description"
|
||||
Description="Customized description">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:LoadingMaskHost IsLoading="{Binding IsLoadingSwitchChecked}"
|
||||
IsShowLoadingMsg="True"
|
||||
LoadingMsg="Loading...">
|
||||
<atom:Alert Message="Alert message title"
|
||||
Description="Further details about the context of this alert."
|
||||
Type="Info" />
|
||||
</atom:LoadingMaskHost>
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<TextBlock>Loading state:</TextBlock>
|
||||
<atom:ToggleSwitch IsChecked="{Binding IsLoadingSwitchChecked}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,22 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class LoadingIndicatorShowCase : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<bool> IsLoadingSwitchCheckedProperty =
|
||||
AvaloniaProperty.Register<ProgressBarShowCase, bool>(nameof(IsLoadingSwitchChecked));
|
||||
|
||||
public bool IsLoadingSwitchChecked
|
||||
{
|
||||
get => GetValue(IsLoadingSwitchCheckedProperty);
|
||||
set => SetValue(IsLoadingSwitchCheckedProperty, value);
|
||||
}
|
||||
|
||||
public LoadingIndicatorShowCase()
|
||||
{
|
||||
DataContext = this;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,192 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.MenuShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="Simplest Usage.">
|
||||
<atom:Menu>
|
||||
<atom:MenuItem Header="_File">
|
||||
<atom:MenuItem Header="New Text File" InputGesture="Ctrl+N" />
|
||||
<atom:MenuItem Header="New File" InputGesture="Ctrl+Alt+N" />
|
||||
<atom:MenuItem Header="New Window" InputGesture="Ctrl+Shift+N" />
|
||||
</atom:MenuItem>
|
||||
<atom:MenuItem Header="_Edit">
|
||||
<atom:MenuItem Header="Undo" InputGesture="Ctrl+Shift+Z" />
|
||||
<atom:MenuSeparator />
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X" />
|
||||
</atom:MenuItem>
|
||||
<atom:MenuItem Header="Disabled Item" IsEnabled="False" />
|
||||
</atom:Menu>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Icon and submenu"
|
||||
Description="With icon and submenu.">
|
||||
<atom:Menu>
|
||||
<atom:MenuItem Header="_File">
|
||||
<atom:MenuItem Header="New Text File" InputGesture="Ctrl+N" />
|
||||
<atom:MenuItem Header="New File" InputGesture="Ctrl+Alt+N" />
|
||||
<atom:MenuItem Header="New Window" InputGesture="Ctrl+Shift+N" />
|
||||
<atom:MenuSeparator />
|
||||
<atom:MenuItem Header="Save" InputGesture="Ctrl+S" />
|
||||
<atom:MenuItem Header="Save As..." InputGesture="Ctrl+Shift+S" />
|
||||
<atom:MenuItem Header="Save All" InputGesture="Ctrl+K" />
|
||||
<atom:MenuSeparator />
|
||||
<atom:MenuItem Header="Exit" />
|
||||
</atom:MenuItem>
|
||||
<atom:MenuItem Header="_Edit">
|
||||
<atom:MenuItem Header="Undo" InputGesture="Ctrl+Shift+Z" />
|
||||
<atom:MenuSeparator />
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X" Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C" Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D" Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
<atom:MenuItem Header="Paste">
|
||||
<atom:MenuItem Header="Paste" InputGesture="Ctrl+P"
|
||||
Icon="{atom:IconProvider Kind=FileDoneOutlined}" />
|
||||
<atom:MenuItem Header="Paste from History" InputGesture="Ctrl+Shift+V" />
|
||||
</atom:MenuItem>
|
||||
</atom:MenuItem>
|
||||
</atom:Menu>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="menu item with ToggleType"
|
||||
Description="Renders a checkbox or radio button on a menu.">
|
||||
<atom:Menu>
|
||||
<atom:MenuItem Header="_Menu A">
|
||||
<atom:MenuItem Header="New Text File" InputGesture="Ctrl+N" ToggleType="Radio" GroupName="Group1" />
|
||||
<atom:MenuItem Header="New File" InputGesture="Ctrl+Alt+N" ToggleType="Radio" GroupName="Group1" />
|
||||
<atom:MenuItem Header="New Window" InputGesture="Ctrl+Shift+N" ToggleType="Radio"
|
||||
GroupName="Group1" />
|
||||
<atom:MenuSeparator />
|
||||
<atom:MenuItem Header="Save" InputGesture="Ctrl+S" ToggleType="CheckBox" />
|
||||
<atom:MenuItem Header="Save As..." InputGesture="Ctrl+Shift+S" ToggleType="CheckBox"
|
||||
Icon="{atom:IconProvider Kind=GithubOutlined}" />
|
||||
<atom:MenuItem Header="Save All" InputGesture="Ctrl+K" ToggleType="CheckBox"
|
||||
Icon="{atom:IconProvider Kind=CheckOutlined}" />
|
||||
<atom:MenuSeparator />
|
||||
<atom:MenuItem Header="Exit" />
|
||||
<atom:MenuItem Header="Disabled" IsEnabled="False" />
|
||||
</atom:MenuItem>
|
||||
</atom:Menu>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Scrollable menu"
|
||||
Description="When there are too many menu items, up and down scroll buttons will appear.">
|
||||
<atom:Menu>
|
||||
<atom:MenuItem Header="_Menu">
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
<atom:MenuItem Header="Menu Item" />
|
||||
</atom:MenuItem>
|
||||
</atom:Menu>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Context menu"
|
||||
Description="Right click to bring up the context menu.">
|
||||
<desktop:ShowCaseItem.Styles>
|
||||
<Style Selector="Border#contextMenuContainer">
|
||||
<Setter Property="BorderBrush" Value="Gray" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Padding" Value="10" />
|
||||
<Setter Property="Margin" Value="10" />
|
||||
</Style>
|
||||
</desktop:ShowCaseItem.Styles>
|
||||
<Border Name="contextMenuContainer">
|
||||
<Border.ContextMenu>
|
||||
<atom:ContextMenu>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C" Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
<atom:MenuItem Header="Paste">
|
||||
<atom:MenuItem Header="Paste" InputGesture="Ctrl+P"
|
||||
Icon="{atom:IconProvider Kind=FileDoneOutlined}" />
|
||||
<atom:MenuItem Header="Paste from History" InputGesture="Ctrl+Shift+V" />
|
||||
</atom:MenuItem>
|
||||
</atom:ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
<TextBlock Text="Right Click to show Context Menu" />
|
||||
</Border>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Menu Flyout"
|
||||
Description="Right Click to show Context Flyout">
|
||||
<desktop:ShowCaseItem.Styles>
|
||||
<Style Selector="Border#contextFlyoutContainer">
|
||||
<Setter Property="BorderBrush" Value="Gray" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Padding" Value="10" />
|
||||
<Setter Property="Margin" Value="10" />
|
||||
</Style>
|
||||
</desktop:ShowCaseItem.Styles>
|
||||
|
||||
<Border Name="contextFlyoutContainer">
|
||||
<Border.ContextFlyout>
|
||||
<atom:MenuFlyout>
|
||||
<atom:MenuItem Header="Cut" InputGesture="Ctrl+X"
|
||||
Icon="{atom:IconProvider Kind=ScissorOutlined}" />
|
||||
<atom:MenuItem Header="Copy" InputGesture="Ctrl+C" Icon="{atom:IconProvider Kind=CopyOutlined}" />
|
||||
<atom:MenuItem Header="Delete" InputGesture="Ctrl+D"
|
||||
Icon="{atom:IconProvider Kind=DeleteOutlined}" />
|
||||
<atom:MenuItem Header="Paste">
|
||||
<atom:MenuItem Header="Paste" InputGesture="Ctrl+P"
|
||||
Icon="{atom:IconProvider Kind=FileDoneOutlined}" />
|
||||
<atom:MenuItem Header="Paste from History" InputGesture="Ctrl+Shift+V" />
|
||||
</atom:MenuItem>
|
||||
</atom:MenuFlyout>
|
||||
</Border.ContextFlyout>
|
||||
<TextBlock Text="Right Click to show Context Flyout" />
|
||||
</Border>
|
||||
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class MenuShowCase : UserControl
|
||||
{
|
||||
public MenuShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.MessageShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic"
|
||||
Description="The simplest usage for Message.">
|
||||
<atom:Button ButtonType="Primary"
|
||||
Click="ShowSimpleMessage">
|
||||
Display normal message
|
||||
</atom:Button>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Other types of message"
|
||||
Description="Messages of success, error and warning types.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:Button ButtonType="Default"
|
||||
Click="ShowSuccessMessage">
|
||||
Success
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default"
|
||||
Click="ShowInfoMessage">
|
||||
Info
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default"
|
||||
Click="ShowWarningMessage">
|
||||
Warning
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default"
|
||||
Click="ShowErrorMessage">
|
||||
Error
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Message with loading indicator"
|
||||
Description="Display a global loading indicator, which is dismissed by itself asynchronously.">
|
||||
<atom:Button ButtonType="Default"
|
||||
Click="ShowLoadingMessage">
|
||||
Display a loading indicator
|
||||
</atom:Button>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Callback"
|
||||
Description="The above example will display a new message when the old message is about to close.">
|
||||
<atom:Button ButtonType="Default"
|
||||
Click="ShowSequentialMessage">
|
||||
Display a loading indicator
|
||||
</atom:Button>
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,98 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class MessageShowCase : UserControl
|
||||
{
|
||||
private WindowMessageManager? _messageManager;
|
||||
|
||||
public MessageShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
_messageManager = new WindowMessageManager(topLevel)
|
||||
{
|
||||
MaxItems = 10
|
||||
};
|
||||
}
|
||||
|
||||
private void ShowSimpleMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowInfoMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Information,
|
||||
content: "This is a information message."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowSuccessMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Success,
|
||||
content: "This is a success message."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowWarningMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Warning,
|
||||
content: "This is a warning message."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowErrorMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Error,
|
||||
content: "This is a error message."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowLoadingMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Loading,
|
||||
content: "Action in progress..."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowSequentialMessage(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Loading,
|
||||
content: "Action in progress...",
|
||||
expiration: TimeSpan.FromSeconds(2.5),
|
||||
onClose: () =>
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Success,
|
||||
expiration: TimeSpan.FromSeconds(2.5),
|
||||
content: "Loading finished",
|
||||
onClose: () =>
|
||||
{
|
||||
_messageManager?.Show(new Message(
|
||||
type: MessageType.Information,
|
||||
expiration: TimeSpan.FromSeconds(2.5),
|
||||
content: "Loading finished"
|
||||
));
|
||||
}
|
||||
));
|
||||
}
|
||||
));
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
<UserControl x:Class="AtomUI.Demo.Desktop.ShowCase.NotificationShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem Title="Basic" Description="The simplest usage for Notification.">
|
||||
<atom:Button ButtonType="Primary" Click="ShowSimpleNotification">
|
||||
Show Notification
|
||||
</atom:Button>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Duration after which the notification box is closed"
|
||||
Description="Duration can be used to specify how long the notification stays open. After the duration time elapses, the notification closes automatically. If not specified, default value is 4.5 seconds. If you set the value to TimeSpan.Zero, the notification box will never close automatically.">
|
||||
<atom:Button ButtonType="Primary" Click="ShowNeverCloseNotification">
|
||||
Open the notification box
|
||||
</atom:Button>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Notification with icon"
|
||||
Description="A notification box with a icon at the left side.">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:Button ButtonType="Default" Click="ShowSuccessNotification">
|
||||
Success
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" Click="ShowInfoNotification">
|
||||
Info
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" Click="ShowWarningNotification">
|
||||
Warning
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Default" Click="ShowErrorNotification">
|
||||
Error
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Placement"
|
||||
Description="A notification box can appear from the top bottom topLeft topRight bottomLeft or bottomRight of the viewport via placement.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:Button ButtonType="Primary" Click="ShowTopNotification">
|
||||
Top
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" Click="ShowBottomNotification">
|
||||
Bottom
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<atom:Separator />
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:Button ButtonType="Primary" Click="ShowTopLeftNotification">
|
||||
TopLeft
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" Click="ShowTopRightNotification">
|
||||
TopRight
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
<atom:Separator />
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<atom:Button ButtonType="Primary" Click="ShowBottomLeftNotification">
|
||||
BottomLeft
|
||||
</atom:Button>
|
||||
<atom:Button ButtonType="Primary" Click="ShowBottomRightNotification">
|
||||
BottomRight
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Customized Icon" Description="The icon can be customized to any icon node.">
|
||||
<atom:Button ButtonType="Primary" Click="ShowCustomIconNotification">
|
||||
Open the notification box
|
||||
</atom:Button>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem Title="Show with progress" Description="Show progress bar for auto-closing notification.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:OptionButtonGroup Name="HoverOptionGroup" ButtonStyle="Outline">
|
||||
<atom:OptionButton IsChecked="True">Pause on hover</atom:OptionButton>
|
||||
<atom:OptionButton>Don't pause on hover</atom:OptionButton>
|
||||
</atom:OptionButtonGroup>
|
||||
<atom:Button ButtonType="Primary" Click="ShowProgressNotification">
|
||||
Show Notification
|
||||
</atom:Button>
|
||||
</StackPanel>
|
||||
|
||||
</desktop:ShowCaseItem>
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,215 +0,0 @@
|
||||
using AtomUI.Controls;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using PathIcon = AtomUI.Controls.PathIcon;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class NotificationShowCase : UserControl
|
||||
{
|
||||
private WindowNotificationManager? _basicManager;
|
||||
private WindowNotificationManager? _topLeftManager;
|
||||
private WindowNotificationManager? _topManager;
|
||||
private WindowNotificationManager? _topRightManager;
|
||||
|
||||
private WindowNotificationManager? _bottomLeftManager;
|
||||
private WindowNotificationManager? _bottomManager;
|
||||
private WindowNotificationManager? _bottomRightManager;
|
||||
|
||||
public NotificationShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
HoverOptionGroup.OptionCheckedChanged += HandleHoverOptionGroupCheckedChanged;
|
||||
}
|
||||
|
||||
private void HandleHoverOptionGroupCheckedChanged(object? sender, OptionCheckedChangedEventArgs args)
|
||||
{
|
||||
if (_basicManager is not null)
|
||||
{
|
||||
if (args.Index == 0)
|
||||
{
|
||||
_basicManager.IsPauseOnHover = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_basicManager.IsPauseOnHover = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
var topLevel = TopLevel.GetTopLevel(this);
|
||||
_basicManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
MaxItems = 3
|
||||
};
|
||||
|
||||
_topLeftManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
MaxItems = 3,
|
||||
Position = NotificationPosition.TopLeft
|
||||
};
|
||||
|
||||
_topManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
Position = NotificationPosition.TopCenter,
|
||||
MaxItems = 3
|
||||
};
|
||||
|
||||
_topRightManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
Position = NotificationPosition.TopRight,
|
||||
MaxItems = 3
|
||||
};
|
||||
|
||||
_bottomLeftManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
Position = NotificationPosition.BottomLeft,
|
||||
MaxItems = 3
|
||||
};
|
||||
|
||||
_bottomManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
Position = NotificationPosition.BottomCenter,
|
||||
MaxItems = 3
|
||||
};
|
||||
|
||||
_bottomRightManager = new WindowNotificationManager(topLevel)
|
||||
{
|
||||
Position = NotificationPosition.BottomRight,
|
||||
MaxItems = 3
|
||||
};
|
||||
}
|
||||
|
||||
private void ShowSimpleNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
"Notification Title",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowNeverCloseNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
expiration: TimeSpan.Zero,
|
||||
title: "Notification Title",
|
||||
content:
|
||||
"I will never close automatically. This is a purposely very very long description that has many many characters and words."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowSuccessNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
type: NotificationType.Success,
|
||||
title: "Notification Title",
|
||||
content:
|
||||
"This is the content of the notification. This is the content of the notification. This is the content of the notification."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowInfoNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
type: NotificationType.Information,
|
||||
title: "Notification Title",
|
||||
content:
|
||||
"This is the content of the notification. This is the content of the notification. This is the content of the notification."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowWarningNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
type: NotificationType.Warning,
|
||||
title: "Notification Title",
|
||||
content:
|
||||
"This is the content of the notification. This is the content of the notification. This is the content of the notification."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowErrorNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
type: NotificationType.Error,
|
||||
title: "Notification Title",
|
||||
content:
|
||||
"This is the content of the notification. This is the content of the notification. This is the content of the notification."
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowTopNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_topManager?.Show(new Notification(
|
||||
"Notification Top",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowBottomNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_bottomManager?.Show(new Notification(
|
||||
"Notification Bottom",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowTopLeftNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_topLeftManager?.Show(new Notification(
|
||||
"Notification TopLeft",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowTopRightNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_topRightManager?.Show(new Notification(
|
||||
"Notification TopRight",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowBottomLeftNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_bottomLeftManager?.Show(new Notification(
|
||||
"Notification BottomLeft",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowBottomRightNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_bottomRightManager?.Show(new Notification(
|
||||
"Notification BottomRight",
|
||||
"Hello, AtomUI/Avalonia!"
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowCustomIconNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
"Notification Title",
|
||||
"This is the content of the notification. This is the content of the notification. This is the content of the notification.",
|
||||
icon: new PathIcon
|
||||
{
|
||||
Kind = "SettingOutlined"
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
private void ShowProgressNotification(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_basicManager?.Show(new Notification(
|
||||
type: NotificationType.Information,
|
||||
title: "Notification Title",
|
||||
content:
|
||||
"This is the content of the notification. This is the content of the notification. This is the content of the notification.",
|
||||
showProgress: true
|
||||
));
|
||||
}
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.NumberUpDownShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:atom="https://atomui.net"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel>
|
||||
<desktop:ShowCaseItem
|
||||
Title="Basic usage"
|
||||
Description="Numeric-only NumberUpDown.">
|
||||
<atom:NumericUpDown Value="3" />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Three sizes of NumberUpDown"
|
||||
Description="There are three sizes of an Input box: large (40px), default (32px) and small (24px).">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:NumericUpDown SizeType="Large" Value="3" />
|
||||
<atom:NumericUpDown SizeType="Middle" Value="3" />
|
||||
<atom:NumericUpDown SizeType="Small" Value="3" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Variants"
|
||||
Description="Variants of NumberUpDown.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:NumericUpDown Value="3" StyleVariant="Outline" />
|
||||
<atom:NumericUpDown Value="3" StyleVariant="Filled" />
|
||||
<atom:NumericUpDown Value="3" StyleVariant="Borderless" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Pre / Post tab"
|
||||
Description="Using pre and post tabs example.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:NumericUpDown LeftAddOn="http://" RightAddOn=".com" Width="400" HorizontalAlignment="Left"
|
||||
Value="3" />
|
||||
<atom:NumericUpDown RightAddOn="{atom:IconProvider Kind=SettingOutlined}" Width="400"
|
||||
HorizontalAlignment="Left"
|
||||
Value="3" />
|
||||
<atom:NumericUpDown LeftAddOn="http://" InnerRightContent=".com" Width="400" HorizontalAlignment="Left"
|
||||
Value="3" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="With clear icon"
|
||||
Description="Input box with the remove icon, click the icon to delete everything.">
|
||||
<atom:NumericUpDown Watermark="input with clear icon" Width="400" HorizontalAlignment="Left"
|
||||
IsEnableClearButton="True" />
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="prefix and suffix"
|
||||
Description="Add a prefix or suffix icons inside input.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<atom:NumericUpDown Watermark="Enter your value"
|
||||
InnerLeftContent="{atom:IconProvider Kind=UserOutlined, NormalFilledColor=#D7D7D7}"
|
||||
InnerRightContent="{atom:IconProvider Kind=InfoCircleOutlined, NormalFilledColor=#8C8C8C}" />
|
||||
<atom:NumericUpDown InnerLeftContent="¥" InnerRightContent="RMB" />
|
||||
<atom:NumericUpDown InnerLeftContent="¥" InnerRightContent="RMB" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
<desktop:ShowCaseItem
|
||||
Title="Status"
|
||||
Description="Add status to Input with status, which could be error or warning.">
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0, 0, 20, 0">
|
||||
<atom:NumericUpDown Watermark="Error" Status="Error" />
|
||||
<atom:NumericUpDown Watermark="Warning" Status="Warning" />
|
||||
<atom:NumericUpDown Watermark="Error with prefix"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" Status="Error" />
|
||||
<atom:NumericUpDown Watermark="Warning with prefix"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}" Status="Warning" />
|
||||
|
||||
<atom:NumericUpDown Watermark="Error" Status="Error"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
StyleVariant="Filled" />
|
||||
<atom:NumericUpDown Watermark="Warning" Status="Warning"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
StyleVariant="Filled" />
|
||||
|
||||
<atom:NumericUpDown Watermark="Error" Status="Error"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
StyleVariant="Borderless" />
|
||||
<atom:NumericUpDown Watermark="Warning" Status="Warning"
|
||||
InnerLeftContent="{atom:IconProvider Kind=ClockCircleOutlined}"
|
||||
StyleVariant="Borderless" />
|
||||
</StackPanel>
|
||||
</desktop:ShowCaseItem>
|
||||
|
||||
</desktop:ShowCasePanel>
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class NumberUpDownShowCase : UserControl
|
||||
{
|
||||
public NumberUpDownShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,425 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.Overview"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Avalonia.Markup.Xaml.Converters;assembly=Avalonia.Markup.Xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="1000"
|
||||
d:DesignWidth="1920"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<UserControl.Styles>
|
||||
<Style Selector="Border.CodeBlock">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SemiColorBorder}" />
|
||||
<Setter Property="Padding" Value="16" />
|
||||
<Setter Property="CornerRadius" Value="6" />
|
||||
<Setter Property="Background" Value="{DynamicResource SemiColorFill0}" />
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<TextBlock
|
||||
Margin="12,0"
|
||||
FontWeight="600"
|
||||
Text="Welcome AtomUI for Avalonia/.NET" />
|
||||
<!-- <StackPanel Margin="20"> -->
|
||||
<!-- <StackPanel -->
|
||||
<!-- Margin="20" -->
|
||||
<!-- HorizontalAlignment="Center" -->
|
||||
<!-- Orientation="Horizontal"> -->
|
||||
<!-- <PathIcon -->
|
||||
<!-- Width="32" -->
|
||||
<!-- Height="32" -->
|
||||
<!-- Data="M10.6201 17.5C6.06377 17.5 2.37012 13.8063 2.37012 9.25C2.37012 4.69365 6.06377 1 10.6201 1V17.5ZM13.3701 6.5C17.9265 6.5 21.6201 10.1936 21.6201 14.75C21.6201 19.3063 17.9265 23 13.3701 23V6.5Z" /> -->
|
||||
<!-- <PathIcon -->
|
||||
<!-- Width="10" -->
|
||||
<!-- Height="10" -->
|
||||
<!-- Margin="20,0" -->
|
||||
<!-- Data="M20.5 13.5C21.3284 13.5 22 12.8284 22 12C22 11.1716 21.3284 10.5 20.5 10.5L13.5 10.5L13.5 3.5C13.5 2.67157 12.8284 2 12 2C11.1716 2 10.5 2.67157 10.5 3.5L10.5 10.5L3.5 10.5C2.67157 10.5 2 11.1716 2 12C2 12.8284 2.67157 13.5 3.5 13.5L10.5 13.5V20.5C10.5 21.3284 11.1716 22 12 22C12.8284 22 13.5 21.3284 13.5 20.5V13.5L20.5 13.5Z" /> -->
|
||||
<!-- <Image Width="32" Height="32"> -->
|
||||
<!-- <Image.Source> -->
|
||||
<!-- <DrawingImage> -->
|
||||
<!-- <DrawingGroup> -->
|
||||
<!-- <GeometryDrawing Brush="#8B44AC" -->
|
||||
<!-- Geometry="M74.8535 85.8231C75.0263 85.8231 75.1954 85.8231 75.3679 85.8231C80.7347 85.8231 85.1439 81.8027 85.7614 76.6019L85.8357 41.7604C85.2255 18.5931 66.2537 0 42.9393 0C19.2399 0 0.02771 19.2122 0.02771 42.9116C0.02771 66.3573 18.8309 85.418 42.18 85.8231H74.8535Z" /> -->
|
||||
<!-- <GeometryDrawing Brush="#F9F9FB" -->
|
||||
<!-- Geometry="M43.0585 14.6143C29.5513 14.6143 18.2555 24.082 15.4454 36.7432C18.1357 37.4975 20.1087 39.9679 20.1087 42.8992C20.1087 45.8305 18.1357 48.301 15.4454 49.0552C18.2555 61.7164 29.5513 71.1842 43.0585 71.1842C47.9754 71.1842 52.5993 69.9296 56.6276 67.723V70.9926H71.3435V44.0716C71.3569 43.7138 71.3435 43.2603 71.3435 42.8992C71.3435 27.2779 58.6799 14.6143 43.0585 14.6143ZM29.5096 42.8992C29.5096 35.4164 35.5757 29.3503 43.0585 29.3503C50.5414 29.3503 56.6074 35.4164 56.6074 42.8992C56.6074 50.3821 50.5414 56.4481 43.0585 56.4481C35.5757 56.4481 29.5096 50.3821 29.5096 42.8992Z" /> -->
|
||||
<!-- <GeometryDrawing Brush="#F9F9FB" -->
|
||||
<!-- Geometry="M18.105 42.8805C18.105 45.3803 16.0785 47.4068 13.5787 47.4068C11.0789 47.4068 9.05237 45.3803 9.05237 42.8805C9.05237 40.3807 11.0789 38.3542 13.5787 38.3542C16.0785 38.3542 18.105 40.3807 18.105 42.8805Z" /> -->
|
||||
<!-- </DrawingGroup> -->
|
||||
<!-- </DrawingImage> -->
|
||||
<!-- </Image.Source> -->
|
||||
<!-- </Image> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <TextBlock -->
|
||||
<!-- HorizontalAlignment="Center" -->
|
||||
<!-- Classes="H1" -->
|
||||
<!-- Text="Semi Avalonia" -->
|
||||
<!-- Theme="{DynamicResource TitleTextBlock}" /> -->
|
||||
<!-- <TextBlock -->
|
||||
<!-- MaxWidth="600" -->
|
||||
<!-- Margin="0,20,0,0" -->
|
||||
<!-- HorizontalAlignment="Center" -->
|
||||
<!-- Classes="Secondary" -->
|
||||
<!-- Text="AvaloniaUI Theme inspired by Semi Design. An easy-to-customize modern design system that helps designers and developers create high-quality products." -->
|
||||
<!-- TextWrapping="Wrap" /> -->
|
||||
<!-- <StackPanel -->
|
||||
<!-- Margin="0,10,0,0" -->
|
||||
<!-- HorizontalAlignment="Center" -->
|
||||
<!-- Orientation="Horizontal"> -->
|
||||
<!-- <TextBlock -->
|
||||
<!-- Margin="12,0" -->
|
||||
<!-- FontWeight="600" -->
|
||||
<!-- Text="Modern" /> -->
|
||||
<!-- <TextBlock -->
|
||||
<!-- Margin="12,0" -->
|
||||
<!-- FontWeight="600" -->
|
||||
<!-- Foreground="{Binding #color.Color, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" -->
|
||||
<!-- Text="Flexible" /> -->
|
||||
<!-- <TextBlock -->
|
||||
<!-- Margin="12,0" -->
|
||||
<!-- FontWeight="600" -->
|
||||
<!-- Text="Simple" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel HorizontalAlignment="Center"> -->
|
||||
<!-- <StackPanel> -->
|
||||
<!-- <StackPanel Orientation="Horizontal"> -->
|
||||
<!-- <StackPanel Margin="16,0"> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- Classes="Primary" -->
|
||||
<!-- Content="Primary" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Theme="{DynamicResource SolidButton}" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- Classes="Secondary" -->
|
||||
<!-- Content="Secondary" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Theme="{DynamicResource SolidButton}" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- Classes="Tertiary" -->
|
||||
<!-- Content="Tertiary" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Theme="{DynamicResource SolidButton}" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- Classes="Success" -->
|
||||
<!-- Content="Success" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Theme="{DynamicResource SolidButton}" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- Classes="Warning" -->
|
||||
<!-- Content="Warning" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Theme="{DynamicResource SolidButton}" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- Classes="Danger" -->
|
||||
<!-- Content="Danger" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Theme="{DynamicResource SolidButton}" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <Calendar Margin="16,0" /> -->
|
||||
<!-- <StackPanel Margin="16,0"> -->
|
||||
<!-- <TextBox -->
|
||||
<!-- Width="300" -->
|
||||
<!-- Margin="0,12" -->
|
||||
<!-- InnerLeftContent="https://" -->
|
||||
<!-- InnerRightContent=".com" /> -->
|
||||
<!-- <DatePicker Width="300" Margin="0,12" /> -->
|
||||
<!-- <CalendarDatePicker Width="300" Margin="0,12" /> -->
|
||||
<!-- <NumericUpDown Width="300" Margin="0,12" /> -->
|
||||
<!-- <ComboBox Width="300" Margin="0,12"> -->
|
||||
<!-- <ComboBoxItem>Avalonia</ComboBoxItem> -->
|
||||
<!-- <ComboBoxItem>Semi Design</ComboBoxItem> -->
|
||||
<!-- <ComboBoxItem>IRIHI Technology</ComboBoxItem> -->
|
||||
<!-- </ComboBox> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel> -->
|
||||
<!-- <UniformGrid HorizontalAlignment="Center" Columns="3"> -->
|
||||
<!-- <UniformGrid.Styles> -->
|
||||
<!-- <Style Selector="CheckBox"> -->
|
||||
<!-- <Setter Property="Margin" Value="4" /> -->
|
||||
<!-- </Style> -->
|
||||
<!-- </UniformGrid.Styles> -->
|
||||
<!-- <CheckBox Content="Windows" IsChecked="True" /> -->
|
||||
<!-- <CheckBox Content="macOS" IsChecked="True" /> -->
|
||||
<!-- <CheckBox Content="Linux" IsChecked="True" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="iOS" -->
|
||||
<!-- IsChecked="{x:Null}" -->
|
||||
<!-- IsThreeState="True" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="Android" -->
|
||||
<!-- IsChecked="{x:Null}" -->
|
||||
<!-- IsThreeState="True" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="Wasm" -->
|
||||
<!-- IsChecked="{x:Null}" -->
|
||||
<!-- IsThreeState="True" /> -->
|
||||
<!-- </UniformGrid> -->
|
||||
<!-- <UniformGrid HorizontalAlignment="Center" Columns="3"> -->
|
||||
<!-- <UniformGrid.Styles> -->
|
||||
<!-- <Style Selector="CheckBox"> -->
|
||||
<!-- <Setter Property="Margin" Value="4" /> -->
|
||||
<!-- </Style> -->
|
||||
<!-- </UniformGrid.Styles> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="Windows" -->
|
||||
<!-- IsChecked="True" -->
|
||||
<!-- Theme="{DynamicResource CardCheckBox}" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="macOS" -->
|
||||
<!-- IsChecked="True" -->
|
||||
<!-- Theme="{DynamicResource CardCheckBox}" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="Linux" -->
|
||||
<!-- IsChecked="True" -->
|
||||
<!-- Theme="{DynamicResource CardCheckBox}" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="iOS" -->
|
||||
<!-- IsChecked="{x:Null}" -->
|
||||
<!-- IsThreeState="True" -->
|
||||
<!-- Theme="{DynamicResource CardCheckBox}" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="Android" -->
|
||||
<!-- IsChecked="{x:Null}" -->
|
||||
<!-- IsThreeState="True" -->
|
||||
<!-- Theme="{DynamicResource CardCheckBox}" /> -->
|
||||
<!-- <CheckBox -->
|
||||
<!-- Content="Wasm" -->
|
||||
<!-- IsChecked="{x:Null}" -->
|
||||
<!-- IsThreeState="True" -->
|
||||
<!-- Theme="{DynamicResource CardCheckBox}" /> -->
|
||||
<!-- </UniformGrid> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Orientation="Horizontal"> -->
|
||||
<!-- <StackPanel Margin="16,0"> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Classes="Primary" -->
|
||||
<!-- Content="Primary" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Classes="Secondary" -->
|
||||
<!-- Content="Secondary" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Classes="Tertiary" -->
|
||||
<!-- Content="Tertiary" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Classes="Success" -->
|
||||
<!-- Content="Success" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Classes="Warning" -->
|
||||
<!-- Content="Warning" /> -->
|
||||
<!-- <Button -->
|
||||
<!-- Margin="0,8" -->
|
||||
<!-- HorizontalAlignment="Stretch" -->
|
||||
<!-- Classes="Danger" -->
|
||||
<!-- Content="Danger" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <ColorView -->
|
||||
<!-- Name="color" -->
|
||||
<!-- VerticalAlignment="Top" -->
|
||||
<!-- Palette="{DynamicResource SemiColorPalette}" -->
|
||||
<!-- SelectedIndex="2" -->
|
||||
<!-- Color="#8B44AC" /> -->
|
||||
<!-- <StackPanel Width="300" Margin="8"> -->
|
||||
<!-- <StackPanel Orientation="Horizontal"> -->
|
||||
<!-- <Slider -->
|
||||
<!-- Name="slider" -->
|
||||
<!-- Width="200" -->
|
||||
<!-- Margin="16" -->
|
||||
<!-- Maximum="100" -->
|
||||
<!-- Minimum="0" /> -->
|
||||
<!-- <ToggleSwitch Name="three" IsChecked="True" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <UniformGrid Columns="2"> -->
|
||||
<!-- <ProgressBar -->
|
||||
<!-- Width="100" -->
|
||||
<!-- MinWidth="100" -->
|
||||
<!-- Margin="0,16" -->
|
||||
<!-- IsIndeterminate="{Binding #three.IsChecked}" -->
|
||||
<!-- ShowProgressText="True" -->
|
||||
<!-- Value="{Binding #slider.Value}" /> -->
|
||||
<!-- <ProgressBar -->
|
||||
<!-- Width="100" -->
|
||||
<!-- Height="100" -->
|
||||
<!-- IsIndeterminate="{Binding #three.IsChecked}" -->
|
||||
<!-- ShowProgressText="True" -->
|
||||
<!-- Theme="{DynamicResource ProgressRing}" -->
|
||||
<!-- Value="{Binding #slider.Value}" /> -->
|
||||
<!-- </UniformGrid> -->
|
||||
<!-- <TabStrip Margin="0,8"> -->
|
||||
<!-- <TabStripItem Content="Tab 1" /> -->
|
||||
<!-- <TabStripItem Content="Tab 2" /> -->
|
||||
<!-- <TabStripItem Content="Tab 3" /> -->
|
||||
<!-- </TabStrip> -->
|
||||
<!-- <Menu Margin="0,8"> -->
|
||||
<!-- <MenuItem Header="Menu 1"> -->
|
||||
<!-- <MenuItem Header="SubMenu 1" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 2" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 3" /> -->
|
||||
<!-- </MenuItem> -->
|
||||
<!-- <MenuItem Header="Menu 2"> -->
|
||||
<!-- <MenuItem Header="SubMenu 1" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 2" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 3" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 4"> -->
|
||||
<!-- <MenuItem Header="SubMenu 1" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 2" /> -->
|
||||
<!-- <MenuItem Header="SubMenu 3" /> -->
|
||||
<!-- </MenuItem> -->
|
||||
<!-- </MenuItem> -->
|
||||
<!-- <MenuItem Header="Menu 3" /> -->
|
||||
<!-- </Menu> -->
|
||||
<!-- -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Margin="8"> -->
|
||||
<!-- -->
|
||||
<!-- <UniformGrid HorizontalAlignment="Center" Columns="3"> -->
|
||||
<!-- <UniformGrid.Styles> -->
|
||||
<!-- <Style Selector="RadioButton"> -->
|
||||
<!-- <Setter Property="Margin" Value="4" /> -->
|
||||
<!-- <Setter Property="HorizontalAlignment" Value="Center" /> -->
|
||||
<!-- </Style> -->
|
||||
<!-- </UniformGrid.Styles> -->
|
||||
<!-- <RadioButton Content="Avalonia" IsChecked="True" /> -->
|
||||
<!-- <RadioButton Content="WPF" /> -->
|
||||
<!-- <RadioButton Content="Xamarin" /> -->
|
||||
<!-- </UniformGrid> -->
|
||||
<!-- <UniformGrid HorizontalAlignment="Center" Columns="3"> -->
|
||||
<!-- <UniformGrid.Styles> -->
|
||||
<!-- <Style Selector="RadioButton"> -->
|
||||
<!-- <Setter Property="Margin" Value="4" /> -->
|
||||
<!-- <Setter Property="HorizontalAlignment" Value="Center" /> -->
|
||||
<!-- </Style> -->
|
||||
<!-- </UniformGrid.Styles> -->
|
||||
<!-- <RadioButton -->
|
||||
<!-- Content="Avalonia" -->
|
||||
<!-- IsChecked="True" -->
|
||||
<!-- Theme="{DynamicResource CardRadioButton}" /> -->
|
||||
<!-- <RadioButton Content="WPF" Theme="{DynamicResource CardRadioButton}" /> -->
|
||||
<!-- <RadioButton Content="Xamarin" Theme="{DynamicResource CardRadioButton}" /> -->
|
||||
<!-- </UniformGrid> -->
|
||||
<!-- <WrapPanel Width="300"> -->
|
||||
<!-- <WrapPanel.Styles> -->
|
||||
<!-- <Style Selector="Label"> -->
|
||||
<!-- <Setter Property="Margin" Value="4" /> -->
|
||||
<!-- <Setter Property="HorizontalContentAlignment" Value="Center" /> -->
|
||||
<!-- </Style> -->
|
||||
<!-- </WrapPanel.Styles> -->
|
||||
<!-- <Label Classes="Red" Theme="{StaticResource TagLabel}">Red</Label> -->
|
||||
<!-- <Label Classes="Pink" Theme="{StaticResource TagLabel}">Pink</Label> -->
|
||||
<!-- <Label Classes="Purple" Theme="{StaticResource TagLabel}">Purple</Label> -->
|
||||
<!-- <Label Classes="Violet" Theme="{StaticResource TagLabel}">Violet</Label> -->
|
||||
<!-- <Label Classes="Indigo" Theme="{StaticResource TagLabel}">Indigo</Label> -->
|
||||
<!-- <Label Classes="Blue" Theme="{StaticResource TagLabel}">Blue</Label> -->
|
||||
<!-- <Label Classes="LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label> -->
|
||||
<!-- <Label Classes="Cyan" Theme="{StaticResource TagLabel}">Cyan</Label> -->
|
||||
<!-- <Label Classes="Teal" Theme="{StaticResource TagLabel}">Teal</Label> -->
|
||||
<!-- <Label Classes="Green" Theme="{StaticResource TagLabel}">Green</Label> -->
|
||||
<!-- <Label Classes="LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label> -->
|
||||
<!-- <Label Classes="Lime" Theme="{StaticResource TagLabel}">Lime</Label> -->
|
||||
<!-- <Label Classes="Yellow" Theme="{StaticResource TagLabel}">Yellow</Label> -->
|
||||
<!-- <Label Classes="Amber" Theme="{StaticResource TagLabel}">Amber</Label> -->
|
||||
<!-- <Label Classes="Orange" Theme="{StaticResource TagLabel}">Orange</Label> -->
|
||||
<!-- <Label Classes="Grey" Theme="{StaticResource TagLabel}">Grey</Label> -->
|
||||
<!-- <Label Classes="White" Theme="{StaticResource TagLabel}">White</Label> -->
|
||||
<!-- <Label Classes="Large" Theme="{StaticResource TagLabel}">Large</Label> -->
|
||||
<!-- <Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle</Label> -->
|
||||
<!-- </WrapPanel> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <TextBlock -->
|
||||
<!-- Margin="0,32,0,16" -->
|
||||
<!-- Classes="H5" -->
|
||||
<!-- Text="Start to install" -->
|
||||
<!-- Theme="{DynamicResource TitleTextBlock}" /> -->
|
||||
<!-- <TabControl Padding="8"> -->
|
||||
<!-- <TabItem Header="Main"> -->
|
||||
<!-- <StackPanel> -->
|
||||
<!-- <TextBlock Text="Install via nuget: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].MainInstall}" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- <TextBlock Text="Reference styles: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock -->
|
||||
<!-- FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].MainStyle}" -->
|
||||
<!-- TextWrapping="Wrap" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="ColorPicker"> -->
|
||||
<!-- <StackPanel> -->
|
||||
<!-- <TextBlock Text="Install via nuget: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].ColorPickerInstall}" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- <TextBlock Text="Reference styles: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock -->
|
||||
<!-- FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].ColorPickerStyle}" -->
|
||||
<!-- TextWrapping="Wrap" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="DataGrid"> -->
|
||||
<!-- <StackPanel> -->
|
||||
<!-- <TextBlock Text="Install via nuget: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].DataGridInstall}" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- <TextBlock Text="Reference styles: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock -->
|
||||
<!-- FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].DataGridStyle}" -->
|
||||
<!-- TextWrapping="Wrap" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- <TabItem Header="TreeDataGrid"> -->
|
||||
<!-- <StackPanel> -->
|
||||
<!-- <TextBlock Text="Install via nuget: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].TreeDataGridInstall}" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- <TextBlock Text="Reference styles: " /> -->
|
||||
<!-- <Border Margin="0,16" Classes="CodeBlock"> -->
|
||||
<!-- <SelectableTextBlock -->
|
||||
<!-- FontFamily="Consolas" -->
|
||||
<!-- Text="{Binding $parent[local:Overview].TreeDataGridStyle}" -->
|
||||
<!-- TextWrapping="Wrap" /> -->
|
||||
<!-- </Border> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </TabItem> -->
|
||||
<!-- </TabControl> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </StackPanel> -->
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
@ -1,43 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class Overview : UserControl
|
||||
{
|
||||
public Overview()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string MainInstall { get; set; } = "dotnet add package AtomUI --version 11.0.7";
|
||||
|
||||
public string MainStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://AtomUI/Themes/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string ColorPickerInstall { get; set; } = "dotnet add package AtomUI.ColorPicker --version 11.0.7";
|
||||
|
||||
public string ColorPickerStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://AtomUI.ColorPicker/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string DataGridInstall { get; set; } = "dotnet add package AtomUI.DataGrid --version 11.0.7";
|
||||
|
||||
public string DataGridStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://AtomUI.DataGrid/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
|
||||
public string TreeDataGridInstall { get; set; } = "dotnet add package AtomUI.TreeDataGrid --version 11.0.7";
|
||||
|
||||
public string TreeDataGridStyle { get; set; } = """
|
||||
<Application.Styles>
|
||||
<StyleInclude Source="avares://AtomUI.TreeDataGrid/Index.axaml" />
|
||||
</Application.Styles>
|
||||
""";
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="AtomUI.Demo.Desktop.ShowCase.PaginationShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:desktop="clr-namespace:AtomUI.Demo.Desktop"
|
||||
|
||||
mc:Ignorable="d">
|
||||
<desktop:ShowCasePanel />
|
||||
</UserControl>
|
@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace AtomUI.Demo.Desktop.ShowCase;
|
||||
|
||||
public partial class PaginationShowCase : UserControl
|
||||
{
|
||||
public PaginationShowCase()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
<UserControl x:Class="AtomUI.Demo.Desktop.ShowCase.PaletteShowCase"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:AtomUI.Demo.Desktop.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:viewModels="clr-namespace:AtomUI.Demo.Desktop.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:PaletteDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<Design.DataContext>
|
||||
<viewModels:PaletteDemoViewModel />
|
||||
</Design.DataContext>
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="../Themes/ToggleButton.axaml" />
|
||||
<ResourceInclude Source="../Controls/Colors/ColorItemControl.axaml" />
|
||||
<ResourceInclude Source="../Controls/Colors/ColorListControl.axaml" />
|
||||
<ResourceInclude Source="../Controls/Colors/ColorListGroupControl.axaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<TabControl>
|
||||
<TabItem Header="Light">
|
||||
<ScrollViewer>
|
||||
<ItemsControl ItemsSource="{Binding LightLists}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:ColorGroupViewModel">
|
||||
<controls:ColorListGroupControl Margin="0,0,0,10" GroupData="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Dark">
|
||||
<ScrollViewer>
|
||||
<Border Background="Black">
|
||||
<ItemsControl ItemsSource="{Binding DarkLists}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:ColorGroupViewModel">
|
||||
<controls:ColorListGroupControl Margin="0,0,0,10" GroupData="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</UserControl>
|