Compare commits

...

189 Commits

Author SHA1 Message Date
Zhang Dian
ac3dc1bbff misc: update .editorconfig to use UTF-8 without BOM. 2026-01-19 20:47:11 +08:00
Zhang Dian
9873d85603 misc: add .editorconfig. 2026-01-19 16:19:53 +08:00
Zhang Dian
4ef1520e64 fix: remove inline text decorations from Popup styles. 2026-01-16 17:40:11 +08:00
Dong Bin
5e751ccdbb Disable scroll chaining in AutoCompleteBox popup. (#716)
* feat: disable scroll chaining in popup.

* feat: disable scroll chaining in MenuScrollViewer
2026-01-09 15:45:00 +08:00
Dong Bin
13dcdbdd07 chore: mark old versions as EOL. (#715) 2026-01-04 23:42:51 +08:00
Zhang Dian
185fe8c984 fix: fix the reference version of TDG. 2025-12-30 16:33:43 +08:00
Zhang Dian
622c8c23b7 ci: add adroid workload. 2025-12-30 16:04:07 +08:00
Zhang Dian
104ba2f1f4 misc: bump version. 2025-12-30 15:26:35 +08:00
Zhang Dian
4895d2f51b fix: ClearButton shouble not be focusable. 2025-12-29 16:02:00 +08:00
Shatyuka
414736443d fix: controls under TextBox inheriting Ibeam cursor (#710) 2025-12-22 19:32:57 +08:00
Copilot
65d2f88cab Make DataGrid cell grid lines use dynamic resources for thickness (#666)
* Initial plan

* Implement dynamic resources for DataGrid grid line thickness and color

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Revert DynamicResource to StaticResource for DataGridLineBrush in theme files

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
2025-12-16 17:08:07 +08:00
Zhang Dian
0a622772f4 ci: specify project path for dotnet restore in publish.yml. 2025-12-10 15:11:49 +08:00
Dong Bin
5ef8f7ddaf fix: replace icon resource include with semi:Icons in Index.axaml (#707) 2025-12-09 16:06:04 +08:00
Zhang Dian
ba9dd0a574 chore: turn on CPM & slnx. 2025-12-09 13:58:01 +08:00
Dong Bin
f784a2c927 fix: try to fix wasm deployment issue. (#698) 2025-11-17 11:23:45 +08:00
Zhang Dian
69cc9b9ca3 misc: bump version. 2025-11-15 15:18:45 +08:00
Zhang Dian
9226858cda misc: bump version. 2025-11-15 14:58:50 +08:00
Copilot
7f81aa3bde Sync upstream: Move ContentPresenter.RecognizesAccessKey to style setters (#696)
* Initial plan

* Move ContentPresenter.RecognizeAccessKey from local value to style

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
2025-11-12 20:08:34 +08:00
Dong Bin
bc37be16ac Merge pull request #695 from irihitech/AITag
Add AI style - Colorful & Gradient to TagLabel
2025-11-11 21:34:04 +08:00
Zhang Dian
7a831d35f7 feat: add AI style - Colorful & Gradient to TagLabel. 2025-11-11 19:06:17 +08:00
Dong Bin
5f8357ecbc Merge pull request #694 from irihitech/AIButton
add AI style - Colorful Button
2025-11-11 16:07:11 +08:00
Zhang Dian
4c7caa6dbf misc: revert SplitButton. 2025-11-11 15:50:32 +08:00
Zhang Dian
445b31893e feat: enhance button styles with AI Colorful classes and update ButtonDemo layout. 2025-11-11 15:20:36 +08:00
Zhang Dian
301a4e954c fix: NEW -> New. 2025-11-05 13:27:23 +08:00
Zhang Dian
dc80578c53 feat: add "NEW" label for AI Icons in IconDemo. 2025-11-05 13:24:21 +08:00
Zhang Dian
6c8825b3df Add AI icons & Excel, PDF, Word icons (#691)
* feat: add AI-related icons.

* feat: add AI icons to IconDemo and update view model.

* feat: rename icon files and update resource includes for consistency.

* feat: refactor IconDemo to use dynamic tab control for icons.

* fix: Filled Icons -> Fill Icons.

* misc: remove commas in icon Path.

* feat: add Excel, PDF, and Word icons.
2025-11-05 12:55:01 +08:00
Zhang Dian
aa105337fa Merge pull request #690 from irihitech/typo
PointerOver -> Pointerover
2025-11-04 14:53:17 +08:00
Copilot
f92b5f4373 Add AI-related color resources to theme palette and demo (#689)
* Initial plan

* Add AI-related color resources for Light and Dark themes

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Fix gradient angle to correctly represent 278 degrees

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Fix gradient angle and add AI resources to palette demo

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Add AI General gradients section to palette demo UI

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* feat: unify gradient initialization.

* feat: add AI-related color resources for Light and Dark themes.

* feat: add AI-related color tokens to ColorTokens and PaletteDemo

* Rename AI token names from Ai to AI (capital)

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* fix: fix AI-related color tokens names.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Co-authored-by: Dong Bin <popmessiah@hotmail.com>
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
2025-11-03 15:18:49 +08:00
Dong Bin
bbff875d9c Merge pull request #684 from irihitech/copilot/update-readme-compatibility
Update README to indicate 11.3.7 is only compatible with Avalonia 11.3.7
2025-10-19 19:58:04 +08:00
copilot-swe-agent[bot]
df75863ac5 Add version 11.3.7 to README compatibility tables
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
2025-10-19 11:53:54 +00:00
copilot-swe-agent[bot]
c04e5e8579 Initial plan 2025-10-19 11:51:45 +00:00
Dong Bin
9fca51b30d Merge pull request #681 from irihitech/fix-679
Using ResourceDictionary.SetItems to improve Locale switching
2025-10-17 07:25:19 +08:00
Zhang Dian
0ea632437d fix: fix copilot comment. 2025-10-16 16:12:40 +08:00
Zhang Dian
c0277a7004 feat: using ResourceDictionary.SetItems to improve Locale switching. 2025-10-16 15:28:45 +08:00
Zhang Dian
2c527dc598 fix: fix README badges for ColorPicker, DataGrid, and TreeDataGrid. 2025-10-09 19:54:35 +08:00
Copilot
ab2cef9dc4 Add README files to NuGet packages (#677)
* Initial plan

* Add README files to NuGet packages for Semi.Avalonia, Semi.Avalonia.DataGrid, and Semi.Avalonia.ColorPicker

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Restore Package.props import to reduce code duplication

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* Add README file to Semi.Avalonia.TreeDataGrid package

Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com>
2025-10-09 19:47:10 +08:00
Dong Bin
86daf6b428 Merge pull request #675 from zdpcdt/android
Upgrade to .NET 9.0 for Android and fix Fonts issue.
2025-10-07 17:21:20 +08:00
Zhang Dian
8f7cdf52b4 feat: upgrade to .NET 9.0 for Android and fix Fonts issue. 2025-10-07 15:35:12 +08:00
Zhang Dian
176430f95f fix: fix web demo issue#674.
upgrade web demo to .NET 9.0 and update GitHub Actions to use checkout@v5.
2025-10-07 13:20:31 +08:00
Zhang Dian
1062175204 misc: bump version. 2025-10-04 11:33:54 +08:00
Zhang Dian
0dda40d322 Merge pull request #672 from irihitech/split
ready for Avalonia 11.3.7
2025-10-04 11:30:33 +08:00
Zhang Dian
37feb8a9a7 feat: set HorizontalAlignment to Stretch for PanelPlacementSelector in SplitViewDemo. 2025-10-04 11:21:42 +08:00
Zhang Dian
c632c6c1f5 feat: upgrade Avalonia.Controls.DataGrid to 11.3.7. 2025-10-04 11:19:25 +08:00
Zhang Dian
be2b25a94b feat: implement IsEditable for ComboBox. 2025-10-04 11:11:07 +08:00
rabbitism
47c6899b94 fix: fix copilot comments. 2025-10-04 10:58:32 +08:00
rabbitism
975d14a36f feat: upgrade to 11.3.7, implement splitview changes. 2025-10-04 10:48:38 +08:00
Dong Bin
7a13de00a6 Merge pull request #669 from irihitech/trayicon
Designed a new TrayIcon and NativeMenu for macOS
2025-09-29 15:29:50 +08:00
Zhang Dian
f7ce4aef30 feat: update application icons for Android and Desktop projects. 2025-09-29 01:33:53 +08:00
Zhang Dian
f9a85734d1 feat: add Activate command to ApplicationViewModel and bind to TrayIcon. 2025-09-29 01:33:18 +08:00
Zhang Dian
9dd846f6be feat: add JumpTo functionality in ApplicationViewModel and integrate with menu. 2025-09-28 18:11:55 +08:00
Zhang Dian
5384de7b23 feat: update TrayIcon in macOS. 2025-09-28 16:29:02 +08:00
Dong Bin
7ccb6fd41a Merge pull request #668 from irihitech/clean
Reduce compile warning count
2025-09-27 14:27:15 +08:00
Zhang Dian
521ed1bd0f misc: reduce publish warning. 2025-09-26 02:10:19 +08:00
Zhang Dian
55d472300e misc: remove x:CompileBindings attribute from multiple XAML files. 2025-09-26 02:10:16 +08:00
Dong Bin
a45f50005c Merge pull request #667 from irihitech/variable
Add search functionality to VariablesDemo
2025-09-26 00:14:29 +08:00
Zhang Dian
cd9daf11da feat: add search functionality to VariablesDemo and update layout. 2025-09-25 18:46:24 +08:00
Zhang Dian
1c69f53c3c misc: bump version. 2025-09-20 18:13:23 +08:00
Dong Bin
8da2e44d4c Merge pull request #664 from irihitech/11.2.1.10
ready for 11.2.1.10
2025-09-20 18:08:36 +08:00
Zhang Dian
6f2129639a misc: using AvaloniaUseCompiledBindingsByDefault. 2025-09-20 18:00:04 +08:00
Zhang Dian
865b453b65 misc: add SemiBorderRadiusSpacingExtraSmall for tokens. 2025-09-20 17:49:54 +08:00
Zhang Dian
5622069446 misc: remove useless theme. 2025-09-20 17:49:20 +08:00
Zhang Dian
76a3d4207f misc: replace Path with PathIcon in DataValidationErrors. 2025-09-20 17:47:14 +08:00
Aytharn
513bbba154 Merge pull request #660 from Aytharn/aytharn/localization-help
This pull request adds additional localisation resources
2025-09-20 17:35:38 +08:00
Dong Bin
727fedaedf Merge pull request #653 from shatyuka/main
fix: fix controls under TextBox inheriting Ibeam cursor
2025-09-04 14:57:26 +08:00
shatyuka
3082ef9ad0 fix: fix controls under TextBox inheriting Ibeam cursor 2025-08-29 18:54:41 +08:00
Dong Bin
985ad0c637 Merge pull request #646 from irihitech/copilot/fix-645
Add ClearButton support for TextBox with TextArea and ClearButton classes
2025-07-25 17:29:43 +08:00
Zhang Dian
59576d4cfd fix: enhance ClearButton visibility and functionality in TextArea styles. 2025-07-25 17:12:30 +08:00
copilot-swe-agent[bot]
c2a072041d Remove AcceptsReturn=False condition and add TextArea ClearButton top alignment
Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com>
2025-07-25 06:43:39 +00:00
Zhang Dian
a62655d25a Merge pull request #644 from irihitech/copilot/fix-622
Add InheritsTransform property to all popup controls for consistent transform behavior
2025-07-25 14:38:32 +08:00
copilot-swe-agent[bot]
2d2f2afec1 Add ClearButton support for TextArea with ClearButton class combination
Co-authored-by: zdpcdt <54255897+zdpcdt@users.noreply.github.com>
2025-07-25 06:10:49 +00:00
copilot-swe-agent[bot]
1f02f28f8b Add InheritsTransform="True" to all popup controls for consistent transform behavior
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
2025-07-25 06:09:02 +00:00
copilot-swe-agent[bot]
ec2202e2ef Initial plan 2025-07-25 06:01:15 +00:00
copilot-swe-agent[bot]
68dfaa8a57 Initial plan 2025-07-25 05:55:04 +00:00
Zhang Dian
16a8d6b37d Merge pull request #643 from irihitech/copilot/fix-642
Set TextInputOptions.ReturnKeyType="Return" as default for TextArea controls
2025-07-25 13:46:51 +08:00
copilot-swe-agent[bot]
6d0f3526a9 Add TextInputOptions.ReturnKeyType="Return" default to TextArea styles
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
2025-07-25 03:58:58 +00:00
copilot-swe-agent[bot]
e5822ff6d1 Initial plan 2025-07-25 03:40:21 +00:00
Zhang Dian
08d55c2b7a misc: bump version. 2025-07-11 19:47:43 +08:00
Zhang Dian
297d4ab825 ci: remove tag push trigger from release workflow. 2025-07-11 19:33:00 +08:00
Zhang Dian
469e2080d4 ci: remove useless command. 2025-07-11 14:15:57 +08:00
Zhang Dian
4d93b387a7 ci: using workflow_call to simplify ci. 2025-07-10 21:38:30 +08:00
Dong Bin
69821dc15e Merge pull request #628 from irihitech/advertisement
Add Ads for Packages base Semi.Avalonia
2025-07-10 10:30:56 +08:00
Dong Bin
a9463b8fad Merge pull request #632 from irihitech/issue/631
Turn on CompileBindings in DataValidationErrors and SplitView XAML
2025-07-01 00:54:31 +08:00
Zhang Dian
37598f94e6 fix: turn on CompileBindings in DataValidationErrors and SplitView XAML files. 2025-06-30 19:31:52 +08:00
Dong Bin
1cb3fe956d fix: fix binding in calendar date picker. (#630) 2025-06-29 10:29:42 +08:00
Dong Bin
7b41fd3f33 Merge pull request #629 from irihitech/miniplayer
feat: add new SemiIconMiniPlayer geometry
2025-06-24 22:10:47 +08:00
Zhang Dian
8e675538ba feat: add new SemiIconMiniPlayer geometry. 2025-06-24 17:19:56 +08:00
Zhang Dian
b61d939fce fix: add the missing installation tutorial. 2025-06-21 15:41:50 +08:00
Zhang Dian
d206876c03 feat: add support for Dock, Tabalonia, and AvaloniaEdit in Overview with installation instructions. 2025-06-21 15:35:52 +08:00
King
4522b48f22 Add French local to the set of languages (#626)
* Create fr-fr.axaml

Creating the locale resource for French language

* Update _index.cs

Include french in the index file

* Update fr-fr.axaml

Fix namespace

* Update MainView.axaml.cs

Adding French as a demo language

* Update demo/Semi.Avalonia.Demo/Views/MainView.axaml.cs

Language specific header name

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

* Update src/Semi.Avalonia/Locale/fr-fr.axaml

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

* Update src/Semi.Avalonia/Locale/fr-fr.axaml

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>

* Add French to the local collection

---------

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
2025-06-14 13:08:24 +08:00
Zhang Dian
ffa2f04842 fix: update zip commands in release-tag.yml to use -j option for better artifact handling. 2025-06-11 18:09:49 +08:00
Zhang Dian
d400a53784 feat: update publish.yml and release-tag.yml for improved artifact handling and new platform support. 2025-06-11 14:46:41 +08:00
Dong Bin
a31b52cc29 Merge pull request #623 from irihitech/dropdownbutton
fix BorderBrush in OutlineDropDownButton
2025-06-09 14:04:28 +08:00
Zhang Dian
5ffcb32b18 fix: fix BorderBrush in OutlineDropDownButton. 2025-06-05 20:51:24 +08:00
Zhang Dian
d9be5bef21 misc: bump versions to 11.2.1.8 and 11.0.10.4. 2025-05-30 18:20:14 +08:00
Zhang Dian
39e12eb6f8 fix: fix description for Linux x64 in publish.yml. 2025-05-30 18:02:23 +08:00
Dong Bin
7bc96775f7 Merge pull request #618 from irihitech/various
Simplify Packages and CI files
2025-05-30 18:00:00 +08:00
Dong Bin
f3a19f7383 Merge pull request #619 from irihitech/demo
Simplify Demo
2025-05-30 01:08:19 +08:00
Zhang Dian
57235c447d misc: extract VMs. 2025-05-29 19:04:25 +08:00
Zhang Dian
d03fe72fc2 misc: format code for consistency and readability. 2025-05-29 18:40:03 +08:00
Zhang Dian
9b70613b6a misc: correct copyright name in LICENSE file. 2025-05-29 17:49:40 +08:00
Zhang Dian
4e897596ac misc: simplify actions. 2025-05-29 17:48:30 +08:00
Zhang Dian
a2a36dbfcf misc: simplify resources include paths and clean up XAML formatting. 2025-05-29 17:08:05 +08:00
Zhang Dian
d5e0675808 misc: update project references. 2025-05-29 16:43:02 +08:00
Zhang Dian
14a3384cd2 Merge pull request #614 from 763305292/main
Add the ability to edit ring progress bar's thickness.
2025-05-27 16:55:38 +08:00
Zhang Dian
a9440fd656 Merge pull request #617 from Soar360/lookless_text_box
Fix #616
2025-05-23 17:14:51 +08:00
Soar360
e119edf8bb Fix #616 2025-05-23 17:09:23 +08:00
Danielli Dazi
648bcc99f3 Update ProgressBarDemo.axaml
using BorderThickness to change ring progress bar's thickness.
2025-05-22 21:28:19 +08:00
Danielli Dazi
24a0d9aace Update ProgressBar.axaml
using progress bar's  BorderThickness property to control Arc's StrokeThickness property.
2025-05-22 21:26:14 +08:00
Zhang Dian
d50af16ee5 Merge pull request #613 from irihitech/scrollbar
Set scrollbar opacity to 1.
2025-05-21 15:42:50 +08:00
Dong Bin
42ceff91bb feat: set scrollbar opacity to 1. 2025-05-21 02:29:46 +08:00
Dong Bin
71984d3e10 Merge pull request #612 from irihitech/button
enhance Button styles
2025-05-20 15:04:22 +08:00
Zhang Dian
1a30867902 fix: using DockPanel. 2025-05-20 14:58:18 +08:00
Zhang Dian
55654c16ae feat: enhance ToggleSwitch styles. 2025-05-18 16:20:57 +08:00
Zhang Dian
2e157b39bb feat: enhance SplitButton styles. 2025-05-18 16:06:30 +08:00
Zhang Dian
37004426fd feat: refactor DropDownButton styles. 2025-05-18 16:06:30 +08:00
Zhang Dian
5148c62d24 feat: refactor ToggleButton styles. 2025-05-18 16:06:30 +08:00
Zhang Dian
926ebc39da misc: enhance Button styles. 2025-05-18 14:56:23 +08:00
Dong Bin
efdc6953e5 Merge pull request #611 from thekrebso/add-pl-pl-locale
Added polish locale
2025-05-17 21:50:46 +08:00
krebso
d3b9d4225e added polish locale 2025-05-16 16:36:33 +02:00
Zhang Dian
ac03334b19 Merge pull request #610 from irihitech/advertisement
Add About Us page
2025-05-06 17:44:21 +08:00
Zhang Dian
4af5fb654f feat: update AboutUs page styles and links. 2025-05-06 17:43:34 +08:00
Dong Bin
08ee7e4dc0 feat: add urls. 2025-05-05 22:08:28 +08:00
Dong Bin
d67c573535 feat: add aboutus page. 2025-05-05 22:07:20 +08:00
Zhang Dian
7056894c03 fix: add opacity to CheckGlyph. 2025-04-27 20:23:02 +08:00
Zhang Dian
62030c581c misc: bump package versions for DataGrid and TreeDataGrid. 2025-04-25 17:35:45 +08:00
Zhang Dian
bc6daf75a0 misc: bump version. 2025-04-25 16:36:20 +08:00
Zhang Dian
213f9ee0d7 Merge pull request #599 from WCKYWCKF/pr_2
feat: add VerticalSplitView control theme with responsive styles
2025-04-25 15:35:40 +08:00
Zhang Dian
cf79993d4a feat: optimize demo. 2025-04-25 15:32:35 +08:00
Dong Bin
0ffc5e697a Merge pull request #602 from irihitech/checkbox
fix Checkbox & RadioButton disabled Background & Simplify Styles
2025-04-24 17:05:42 +08:00
Dong Bin
96cff5df74 Merge pull request #605 from irihitech/pack
optimize Theme style references for Separate Packages
2025-04-23 22:39:27 +08:00
Dong Bin
04c810275a Merge pull request #604 from irihitech/icon
Uncomment icons
2025-04-23 22:36:37 +08:00
Zhang Dian
77ee768962 feat: update README to use SemiTheme components for ColorPicker, DataGrid, and TreeDataGrid. 2025-04-23 21:30:04 +08:00
Zhang Dian
567027e089 feat: add AssemblyInfo for ColorPicker, DataGrid, and TreeDataGrid. 2025-04-23 21:24:30 +08:00
Zhang Dian
0110a53e55 fix: fix SemiIconConfigStroked & delete SemiIconIndenpentCornersStroked. 2025-04-23 11:25:54 +08:00
Zhang Dian
b3842a7866 feat: redesign SemiIconShieldStroked. 2025-04-23 10:49:47 +08:00
Zhang Dian
d085c83d27 feat: uncomment icons. 2025-04-23 01:39:01 +08:00
Zhang Dian
d2af636a1a misc: sync ListBox. 2025-04-21 20:44:30 +08:00
Zhang Dian
7641a94a5a misc: sync RadioButton. 2025-04-21 20:31:41 +08:00
Zhang Dian
391e558721 misc: simplify CheckBox. 2025-04-21 20:19:52 +08:00
Zhang Dian
b20edc3b01 fix: fix CheckBox Disabled Background. 2025-04-21 19:15:06 +08:00
Zhang Dian
82699e7317 misc: simplify SimpleCheckBox layout. 2025-04-21 13:43:16 +08:00
望尘空忧
1ae0585325 feat: enhance SplitViewDemo with dynamic bindings and new layout structure 2025-04-18 19:30:32 +08:00
望尘空忧
f50795cd25 feat: add VerticalSplitView control theme with responsive styles 2025-04-18 19:09:48 +08:00
Dong Bin
31a219f36f Merge pull request #598 from irihitech/treedemo
Transfer TreeDataGrid demo
2025-04-16 22:33:16 +08:00
Zhang Dian
6f98fbb21c Merge pull request #596 from irihitech/treeview
Make TreeViewItem indentation easier
2025-04-16 22:11:26 +08:00
Zhang Dian
cae26f2134 misc: format codes. 2025-04-16 22:09:11 +08:00
Dong Bin
5bd08daaac Merge pull request #597 from irihitech/various
fix disabled fill color in RadioButton & add default FontWeight to TagLabel
2025-04-16 22:00:10 +08:00
Dong Bin
efd94d1d97 feat: finish demo. 2025-04-16 00:53:41 +08:00
Zhang Dian
49a3eada34 misc: add CompileBinding to TabStripDemo. 2025-04-15 22:00:35 +08:00
Zhang Dian
db24d4393b misc: transfer TreeDataGrid demo. 2025-04-15 21:54:18 +08:00
Zhang Dian
90ef903c22 fix: add default FontWeight to TagLabel. 2025-04-14 20:03:58 +08:00
Zhang Dian
cffcaee392 fix: fix disabled fill color in RadioButton. 2025-04-14 15:53:25 +08:00
Dong Bin
3c4da0f82c feat: update per copilot review. 2025-04-14 01:26:10 +08:00
Dong Bin
4120f59c90 feat: use multibinding for TreeViewItem indentation. 2025-04-14 01:21:20 +08:00
Dong Bin
471764f355 Merge pull request #593 from irihitech/token
replace Label color resources & alter some tokens
2025-04-13 09:30:17 +08:00
Zhang Dian
47d7e1d7a8 fix: SemiBlue5 hex in Palette. 2025-04-12 21:55:24 +08:00
Zhang Dian
5843cbf430 feat: remove White color resource in Light & Ghost classes. 2025-04-12 19:07:49 +08:00
Zhang Dian
c9e549c3e8 feat: replace Label color resources. 2025-04-12 19:00:11 +08:00
Zhang Dian
804f95e0e5 feat: SemiBlue5 hex. 2025-04-12 18:06:42 +08:00
Zhang Dian
2569170ce1 feat: add double type tokens for CornerRadius. 2025-04-12 18:05:09 +08:00
Dong Bin
b1e63a857d Merge pull request #591 from irihitech/strip
Redesign TabStrip
2025-04-10 20:49:11 +08:00
Dong Bin
c898e9eb52 Merge pull request #592 from irihitech/button
enhance Buttons
2025-04-10 20:39:36 +08:00
Zhang Dian
c062297031 feat: remove scale transform in Button. 2025-04-09 17:27:55 +08:00
Zhang Dian
2a70cd7ced feat: use Button theme for RepeatButton. 2025-04-09 17:24:22 +08:00
Zhang Dian
8c0160c310 feat: set Margin to 0 for the last TabStripItem. 2025-04-09 17:20:38 +08:00
Zhang Dian
28a1336413 feat: add TabStripDemo. 2025-04-09 17:15:20 +08:00
Zhang Dian
f008333683 feat: sync with TabControl Themes. 2025-04-08 21:13:07 +08:00
Dong Bin
4adfe739e0 Merge pull request #586 from irihitech/scroll2
Improve scrollbar usability when autohide enabled.
2025-04-08 18:39:28 +08:00
Dong Bin
4222e62b76 Merge pull request #587 from irihitech/demo
Rearrange Pages in demo
2025-04-08 18:39:06 +08:00
Dong Bin
b61c9b081f feat: add a padding. 2025-04-08 18:38:09 +08:00
Zhang Dian
c75d413699 misc: add category tabitem. 2025-04-04 13:03:23 +08:00
Dong Bin
39550a6010 Merge pull request #582 from irihitech/Tab
Redesign TabControl
2025-04-04 10:14:11 +08:00
Dong Bin
610d7f4058 misc: minor format issue. 2025-04-03 21:27:59 +08:00
Dong Bin
4a985f42bc feat: update TabControlDemo layout with improved border and alignment settings 2025-04-03 20:26:45 +08:00
Dong Bin
74071f48fe feat: enhance TabItem styles with new padding and alignment properties 2025-04-03 20:20:47 +08:00
Dong Bin
eefc7dc3f2 fix: enhance ScrollViewer scrollbar alignment for better usability 2025-04-03 19:46:27 +08:00
Dong Bin
b90b606b97 fix: update ScrollViewer styles for improved scrollbar behavior 2025-04-03 19:36:01 +08:00
Zhang Dian
09a070e3a9 feat: redesign TabControlDemo. 2025-03-31 10:30:31 +08:00
Zhang Dian
8e7581fbe7 fix: set TabItem HorizontalContentAlignment to Left. 2025-03-30 00:07:16 +08:00
Zhang Dian
051b137121 feat: extract color resources. 2025-03-29 15:04:28 +08:00
Zhang Dian
3f67c32f03 feat: set the last TabItem Margin to 0. 2025-03-29 12:18:09 +08:00
Zhang Dian
7302c59994 misc: TabControlItem -> TabItem. 2025-03-29 12:18:09 +08:00
Zhang Dian
c1d663cefe feat: add ReverseSeparator Classes. 2025-03-29 12:18:08 +08:00
Zhang Dian
3d83cd02e2 feat: inherit BaseTabControl. 2025-03-27 00:41:47 +08:00
Zhang Dian
34d36b19c8 feat: add other scroll TabControl themes. 2025-03-27 00:14:29 +08:00
Zhang Dian
7751f417f0 feat: add BaseTabControl. 2025-03-26 23:57:45 +08:00
Zhang Dian
c5e8bd6662 feat: add CardTabControl & ButtonTabControl. 2025-03-26 17:19:37 +08:00
Zhang Dian
c447fd8d5d feat: add LineTabControl Theme. 2025-03-25 23:50:21 +08:00
Zhang Dian
a7debb7886 fix: fix issues in TabControl. 2025-03-25 11:08:21 +08:00
308 changed files with 9717 additions and 5975 deletions

1907
.editorconfig Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
env:
PROJECT_PATH: demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net8.0-browser/publish/wwwroot
OUTPUT_PATH: demo/Semi.Avalonia.Demo.Web/bin/Release/net10.0-browser/publish/wwwroot
on:
workflow_dispatch:
@@ -11,12 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v5
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
dotnet-version: |
10.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools
@@ -24,9 +25,6 @@ jobs:
- name: Publish .NET Project
run: dotnet publish $PROJECT_PATH -c Release --nologo
- name: Change base-tag in index.html
run: sed -i 's#<base href="/" />#<base href="/Semi.Avalonia/" />#g' $OUTPUT_PATH/index.html
- name: copy index.html to 404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html

View File

@@ -10,23 +10,19 @@ on:
type: string
Semi_Avalonia:
description: 'Pack Semi.Avalonia'
required: true
default: 'true'
default: true
type: boolean
Semi_Avalonia_ColorPicker:
description: 'Pack Semi.Avalonia.ColorPicker'
required: true
default: 'true'
default: true
type: boolean
Semi_Avalonia_DataGrid:
description: 'Pack Semi.Avalonia.DataGrid'
required: true
default: 'false'
default: false
type: boolean
Semi_Avalonia_TreeDataGrid:
description: 'Pack Semi.Avalonia.TreeDataGrid'
required: true
default: 'false'
default: false
type: boolean
jobs:
@@ -35,39 +31,39 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v5
- name: Get Version
run: |
VERSION_TIMESTAMP=$(date +'%Y%m%d%H%M%S')
VERSION="${{ github.event.inputs.Version_Prefix }}-nightly-${VERSION_TIMESTAMP}"
VERSION="${{ inputs.Version_Prefix }}-nightly-${VERSION_TIMESTAMP}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Pack Semi.Avalonia
if: ${{ github.event.inputs.Semi_Avalonia == 'true' }}
run: dotnet pack ./src/Semi.Avalonia -o ./nugets /p:Version=${{ env.VERSION }}
if: ${{ inputs.Semi_Avalonia }}
run: dotnet pack src/Semi.Avalonia -o nugets /p:Version=${{ env.VERSION }}
- name: Pack Semi.Avalonia.ColorPicker
if: ${{ github.event.inputs.Semi_Avalonia_ColorPicker == 'true' }}
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets /p:Version=${{ env.VERSION }}
if: ${{ inputs.Semi_Avalonia_ColorPicker }}
run: dotnet pack src/Semi.Avalonia.ColorPicker -o nugets /p:Version=${{ env.VERSION }}
- name: Pack Semi.Avalonia.DataGrid
if: ${{ github.event.inputs.Semi_Avalonia_DataGrid == 'true' }}
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets /p:Version=${{ env.VERSION }}
if: ${{ inputs.Semi_Avalonia_DataGrid }}
run: dotnet pack src/Semi.Avalonia.DataGrid -o nugets /p:Version=${{ env.VERSION }}
- name: Pack Semi.Avalonia.TreeDataGrid
if: ${{ github.event.inputs.Semi_Avalonia_TreeDataGrid == 'true' }}
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets /p:Version=${{ env.VERSION }}
if: ${{ inputs.Semi_Avalonia_TreeDataGrid }}
run: dotnet pack src/Semi.Avalonia.TreeDataGrid -o nugets /p:Version=${{ env.VERSION }}
- name: Add NuGet Source
run: dotnet nuget add source ${{ secrets.IRIHI_NUGET_NIGHTLY_FEED }} -n irihi.tech -u ${{ secrets.IRIHI_NUGET_USERNAME }} -p ${{ secrets.IRIHI_NUGET_PASSWORD }} --store-password-in-clear-text
- name: Publish Nightly Package
run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.IRIHI_NUGET_API_KEY }} --source irihi.tech --skip-duplicate
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.IRIHI_NUGET_API_KEY }} --source irihi.tech --skip-duplicate
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.6.2
with:
name: nugets
path: ./nugets
path: nugets
if: always()

View File

@@ -3,26 +3,43 @@ name: Pack to NuGet
on:
workflow_dispatch:
inputs:
Upload_to_NuGet:
description: 'Upload to NuGet'
default: true
type: boolean
Semi_Avalonia:
description: 'Pack Semi.Avalonia'
required: true
default: 'true'
default: true
type: boolean
Semi_Avalonia_ColorPicker:
description: 'Pack Semi.Avalonia.ColorPicker'
required: true
default: 'true'
default: true
type: boolean
Semi_Avalonia_DataGrid:
description: 'Pack Semi.Avalonia.DataGrid'
required: true
default: 'false'
default: false
type: boolean
Semi_Avalonia_TreeDataGrid:
description: 'Pack Semi.Avalonia.TreeDataGrid'
required: true
default: 'false'
default: false
type: boolean
workflow_call:
inputs:
Upload_to_NuGet:
type: boolean
default: false
Semi_Avalonia:
type: boolean
default: true
Semi_Avalonia_ColorPicker:
type: boolean
default: true
Semi_Avalonia_DataGrid:
type: boolean
default: true
Semi_Avalonia_TreeDataGrid:
type: boolean
default: true
jobs:
Pack_to_NuGet:
@@ -30,30 +47,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v5
- name: Pack Semi.Avalonia
if: ${{ github.event.inputs.Semi_Avalonia == 'true' }}
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
if: ${{ inputs.Semi_Avalonia }}
run: dotnet pack src/Semi.Avalonia -o nugets
- name: Pack Semi.Avalonia.ColorPicker
if: ${{ github.event.inputs.Semi_Avalonia_ColorPicker == 'true' }}
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
if: ${{ inputs.Semi_Avalonia_ColorPicker }}
run: dotnet pack src/Semi.Avalonia.ColorPicker -o nugets
- name: Pack Semi.Avalonia.DataGrid
if: ${{ github.event.inputs.Semi_Avalonia_DataGrid == 'true' }}
run: dotnet pack ./src/Semi.Avalonia.DataGrid -o ./nugets
if: ${{ inputs.Semi_Avalonia_DataGrid }}
run: dotnet pack src/Semi.Avalonia.DataGrid -o nugets
- name: Pack Semi.Avalonia.TreeDataGrid
if: ${{ github.event.inputs.Semi_Avalonia_TreeDataGrid == 'true' }}
run: dotnet pack ./src/Semi.Avalonia.TreeDataGrid -o ./nugets
if: ${{ inputs.Semi_Avalonia_TreeDataGrid }}
run: dotnet pack src/Semi.Avalonia.TreeDataGrid -o nugets
- name: Publish NuGet package
run: dotnet nuget push "./nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Upload to NuGet
if: ${{ inputs.Upload_to_NuGet }}
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.6.2
with:
name: nugets
path: ./nugets
path: nugets
if: always()

View File

@@ -3,116 +3,223 @@ name: Publish Demo
on:
workflow_dispatch:
inputs:
platform:
description: 'Platform to publish'
required: true
default: 'all'
type: choice
options:
- 'windows'
- 'linux'
- 'android'
- 'all'
include_aot:
description: 'Include Windows AOT packaging'
required: true
default: true
win-x64:
description: 'Windows x64'
default: false
type: boolean
include_drm:
description: 'Include Linux DRM packaging'
required: true
default: true
win-x64-aot:
description: 'Windows x64 AOT'
default: false
type: boolean
linux-x64:
description: 'Linux x64'
default: false
type: boolean
linux-x64-aot:
description: 'Linux x64 AOT'
default: false
type: boolean
drm-linux-x64:
description: 'DRM Linux x64'
default: false
type: boolean
drm-linux-x64-aot:
description: 'DRM Linux x64 AOT'
default: false
type: boolean
osx-arm64:
description: 'macOS arm64'
default: false
type: boolean
osx-arm64-aot:
description: 'macOS arm64 AOT'
default: false
type: boolean
android-arm64:
description: 'Android arm64'
default: false
type: boolean
workflow_call:
inputs:
win-x64:
type: boolean
default: true
win-x64-aot:
type: boolean
default: true
linux-x64:
type: boolean
default: true
linux-x64-aot:
type: boolean
default: true
drm-linux-x64:
type: boolean
default: true
drm-linux-x64-aot:
type: boolean
default: true
osx-arm64:
type: boolean
default: true
osx-arm64-aot:
type: boolean
default: true
android-arm64:
type: boolean
default: true
jobs:
windows:
if: ${{ github.event.inputs.platform == 'windows' || github.event.inputs.platform == 'all' }}
win-x64:
if: ${{inputs.win-x64}}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
uses: actions/checkout@v5
- name: Publish win-x64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
- name: Zip win-x64
run: |
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
- name: Enable Native AOT in .csproj
if: ${{ github.event.inputs.include_aot == 'true' }}
run: |
sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
- name: Publish win-x64 AOT
if: ${{ github.event.inputs.include_aot == 'true' }}
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./publish/win64-aot
- name: Zip win-x64 AOT
if: ${{ github.event.inputs.include_aot == 'true' }}
run: |
$files = Get-ChildItem -Path ./publish/win64-aot/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.6.2
with:
name: windows
path: ./upload
name: Semi.Avalonia.Demo.Desktop.win-x64
path: |
publish
!publish/*.pdb
linux:
if: ${{ github.event.inputs.platform == 'linux' || github.event.inputs.platform == 'all' }}
win-x64-aot:
if: ${{inputs.win-x64-aot}}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Enable Native AOT in .csproj
run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
- name: Publish win-x64 AOT
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o publish
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT
path: |
publish
!publish/*.pdb
linux-x64:
if: ${{inputs.linux-x64}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Make upload directory
run: mkdir upload
uses: actions/checkout@v5
- name: Publish linux-x64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
- name: Zip linux-x64
run: zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
- name: Publish linux-x64 DRM
if: ${{ github.event.inputs.include_drm == 'true' }}
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
- name: Zip linux-x64 DRM
if: ${{ github.event.inputs.include_drm == 'true' }}
run: zip -j -r ./upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./publish/drm -x "*.pdb"
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.6.2
with:
name: linux
path: ./upload
name: Semi.Avalonia.Demo.Desktop.linux-x64
path: |
publish
!publish/*.pdb
android:
if: ${{ github.event.inputs.platform == 'android' || github.event.inputs.platform == 'all' }}
linux-x64-aot:
if: ${{inputs.linux-x64-aot}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Enable Native AOT in .csproj
run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
- name: Publish linux-x64 AOT
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release -o publish
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT
path: |
publish
!publish/*.pdb
drm-linux-x64:
if: ${{inputs.drm-linux-x64}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Publish linux-x64 DRM
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: Semi.Avalonia.Demo.Drm.linux-x64
path: |
publish
!publish/*.pdb
drm-linux-x64-aot:
if: ${{inputs.drm-linux-x64-aot}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Enable Native AOT in .csproj
run: sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj
- name: Publish linux-x64 AOT
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release -o publish
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT
path: |
publish
!publish/*.pdb
osx-arm64:
if: ${{inputs.osx-arm64}}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Publish osx-arm64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: Semi.Avalonia.Demo.Desktop.osx-arm64
path: |
publish
!publish/*.pdb
osx-arm64-aot:
if: ${{inputs.osx-arm64-aot}}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Enable Native AOT in .csproj
run: sed -i '' 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
- name: Publish osx-arm64 AOT
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT
path: |
publish
!publish/*.pdb
android-arm64:
if: ${{inputs.android-arm64 }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: CD Android
run: cd ./demo/Semi.Avalonia.Demo.Android
uses: actions/checkout@v5
- name: Install Android workload
run: dotnet workload install android
- name: Restore Dependencies
run: dotnet restore
run: dotnet restore demo/Semi.Avalonia.Demo.Android
- name: Publish Android
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o ./publish -p:RuntimeIdentifier=android-arm64
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net10.0-android --no-restore -o publish /p:RuntimeIdentifier=android-arm64
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.6.2
with:
name: android
path: ./publish/*Signed.apk
name: android-arm64
path: publish/*Signed.apk

View File

@@ -1,146 +1,73 @@
name: Release Tag
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
inputs:
Upload_to_NuGet:
description: 'Upload to NuGet'
default: false
type: boolean
Semi_Avalonia:
description: 'Pack Semi.Avalonia'
default: true
type: boolean
Semi_Avalonia_ColorPicker:
description: 'Pack Semi.Avalonia.ColorPicker'
default: true
type: boolean
Semi_Avalonia_DataGrid:
description: 'Pack Semi.Avalonia.DataGrid'
default: false
type: boolean
Semi_Avalonia_TreeDataGrid:
description: 'Pack Semi.Avalonia.TreeDataGrid'
default: false
type: boolean
jobs:
pack:
runs-on: ubuntu-latest
nuget:
uses: ./.github/workflows/pack.yml
with:
Upload_to_NuGet: ${{ inputs.Upload_to_NuGet }}
Semi_Avalonia: ${{ inputs.Semi_Avalonia }}
Semi_Avalonia_ColorPicker: ${{ inputs.Semi_Avalonia_ColorPicker }}
Semi_Avalonia_DataGrid: ${{ inputs.Semi_Avalonia_DataGrid }}
Semi_Avalonia_TreeDataGrid: ${{ inputs.Semi_Avalonia_TreeDataGrid }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pack Semi.Avalonia
run: dotnet pack ./src/Semi.Avalonia -o ./nugets
- name: Pack Semi.Avalonia.ColorPicker
run: dotnet pack ./src/Semi.Avalonia.ColorPicker -o ./nugets
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: nugets
path: ./nugets
publish-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish win-x64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win64
- name: Zip win-x64
run: |
$files = Get-ChildItem -Path ./publish/win64/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.zip
- name: Enable Native AOT in .csproj
run: |
sed -i 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
sed -i 's#<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->#<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
- name: Publish win-x64 AOT
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r win-x64 -c Release -o ./publish/win64-aot
- name: Zip win-x64 AOT
run: |
$files = Get-ChildItem -Path ./publish/win64-aot/* -Recurse -Exclude *.pdb
Compress-Archive -Path $files.FullName -DestinationPath ./upload/Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: windows
path: ./upload
publish-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make upload directory
run: mkdir upload
- name: Publish linux-x64
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/linux64
- name: Zip linux-x64
run: zip -j -r ./upload/Semi.Avalonia.Demo.Desktop.linux-x64.zip ./publish/linux64 -x "*.pdb"
- name: Publish linux-x64 DRM
run: dotnet publish demo/Semi.Avalonia.Demo.Drm -r linux-x64 -c Release --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/drm
- name: Zip linux-x64 DRM
run: zip -j -r ./upload/Semi.Avalonia.Demo.Drm.linux-x64.zip ./publish/drm -x "*.pdb"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: linux
path: ./upload
publish-android:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: CD Android
run: cd ./demo/Semi.Avalonia.Demo.Android
- name: Restore Dependencies
run: dotnet restore
- name: Publish Android
run: dotnet publish demo/Semi.Avalonia.Demo.Android -c Release -f net8.0-android --no-restore -o ./publish -p:RuntimeIdentifier=android-arm64
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: android
path: ./publish/*Signed.apk
publish:
uses: ./.github/workflows/publish.yml
draft-release:
needs: [ pack, publish-windows, publish-linux, publish-android ]
needs: [ nuget,publish ]
runs-on: ubuntu-latest
steps:
- name: Download nugets Artifacts
uses: actions/download-artifact@v4
with:
name: nugets
- uses: actions/download-artifact@v4.3.0
- name: Download windows Artifacts
uses: actions/download-artifact@v4
with:
name: windows
- name: Display structure of downloaded files
run: ls -R
- name: Download linux Artifacts
uses: actions/download-artifact@v4
with:
name: linux
- name: Zip artifacts
run: |
zip -rj Semi.Avalonia.Demo.Desktop.win-x64.zip Semi.Avalonia.Demo.Desktop.win-x64
zip -rj Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT.zip Semi.Avalonia.Demo.Desktop.win-x64.NativeAOT
zip -rj Semi.Avalonia.Demo.Desktop.linux-x64.zip Semi.Avalonia.Demo.Desktop.linux-x64
zip -rj Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT.zip Semi.Avalonia.Demo.Desktop.linux-x64.NativeAOT
zip -rj Semi.Avalonia.Demo.Drm.linux-x64.zip Semi.Avalonia.Demo.Drm.linux-x64
zip -rj Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT.zip Semi.Avalonia.Demo.Drm.linux-x64.NativeAOT
zip -rj Semi.Avalonia.Demo.Desktop.osx-arm64.zip Semi.Avalonia.Demo.Desktop.osx-arm64
cd Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT
zip -r ../Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT.zip .
- name: Download android Artifacts
uses: actions/download-artifact@v4
with:
name: android
- name: Display structure of zipped files
run: ls -R
- name: Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v2.3.2
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
with:
generate_release_notes: true
draft: true
files: |
*.nupkg
*.zip
*.apk
nugets/*.nupkg
android-arm64/*.apk
*.zip

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 iriHi Technology
Copyright (c) 2022 IRIHI Technology
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@@ -38,22 +38,30 @@ Include Semi Design Styles in application:
That's all.
ColorPicker, DataGrid and TreeDataGrid are distributed in separated packages. Please install if you need.
ColorPicker, DataGrid, TreeDataGrid, Dock, Tabalonia and AvaloniaEdit are distributed in separated packages. Please install if you need.
```bash
dotnet add package Semi.Avalonia.ColorPicker
dotnet add package Semi.Avalonia.DataGrid
dotnet add package Semi.Avalonia.TreeDataGrid
dotnet add package Semi.Avalonia.Dock
dotnet add package Semi.Avalonia.Tabalonia
dotnet add package Semi.Avalonia.AvaloniaEdit
```
```xaml
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
<semi:ColorPickerSemiTheme />
<semi:DataGridSemiTheme />
<semi:TreeDataGridSemiTheme />
<semi:DockSemiTheme />
<semi:TabaloniaSemiTheme />
<semi:AvaloniaEditSemiTheme />
</Application.Styles>
```
Notice: Dock, Tabalonia and AvaloniaEdit are delivered via nuget for free, but not open source. Please read the license and agree to continue use these packages. If you need source code, please contact us via email: [contact@irihi.tech](contact@irihi.tech)
## Demo
You can always download demo executable to play around with Semi Avalonia Themes.
@@ -63,17 +71,16 @@ You can always download demo executable to play around with Semi Avalonia Themes
We offer limited free community support for Semi Avalonia and Ursa. If you have any question or suggestion, feel free to raise issues and discussions via GitHub, and you are welcomed to join our group via FeiShu(Lark)
![FeiShu](./docs/community-support.png)
![FeiShu](./docs/community-support.png)
## Version compatibility
| Semi Design Version | Avalonia Version |
|:--------------------|:-----------------|
| 11.2.1 | >=11.2.1 |
| 11.2.0 | 11.2.0 |
| 11.1.0 | >=11.1.0 |
| 11.0.7 | >=11.0.7 |
| 11.0.1 | <=11.0.6 |
| Semi Avalonia Version | Avalonia Version |
|:----------------------|:-----------------|
| 11.3.7 | >=11.3.7 |
| 11.2.1 | >=11.2.1 |
| 11.2.0 | End of Life |
| 11.1.x | End of Life |
## Credits

View File

@@ -38,22 +38,30 @@ dotnet add package Semi.Avalonia
这样就可以了。
ColorPicker、DataGridTreeDataGrid 的样式单独分发,如果需要请安装并引用。
ColorPicker、DataGridTreeDataGrid、Dock、Tabalonia 和 AvaloniaEdit 的样式单独分发,如果需要请安装并引用。
```bash
dotnet add package Semi.Avalonia.ColorPicker
dotnet add package Semi.Avalonia.DataGrid
dotnet add package Semi.Avalonia.TreeDataGrid
dotnet add package Semi.Avalonia.Dock
dotnet add package Semi.Avalonia.Tabalonia
dotnet add package Semi.Avalonia.AvaloniaEdit
```
```xaml
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
<semi:ColorPickerSemiTheme />
<semi:DataGridSemiTheme />
<semi:TreeDataGridSemiTheme />
<semi:DockSemiTheme />
<semi:TabaloniaSemiTheme />
<semi:AvaloniaEditSemiTheme />
</Application.Styles>
```
注意Dock、Tabalonia 和 AvaloniaEdit 是通过 NuGet 免费分发的,但不是开源的。请阅读许可协议并同意后继续使用这些包。如果您需要源代码,请通过电子邮件联系我们:[contact@irihi.tech](contact@irihi.tech)
## 示例
您可以从 Semi Avalonia 的 release 页下载并试用 Semi Avalonia 的展示应用。
@@ -67,13 +75,12 @@ dotnet add package Semi.Avalonia.TreeDataGrid
## 版本兼容性
| Semi Design Version | Avalonia Version |
|:--------------------|:-----------------|
| 11.2.1 | >=11.2.1 |
| 11.2.0 | 11.2.0 |
| 11.1.0 | >=11.1.0 |
| 11.0.7 | >=11.0.7 |
| 11.0.1 | <=11.0.6 |
| Semi Avalonia Version | Avalonia Version |
|:----------------------|:-----------------|
| 11.3.7 | >=11.3.7 |
| 11.2.1 | >=11.2.1 |
| 11.2.0 | End of Life |
| 11.1.x | End of Life |
## 致谢

View File

@@ -1,106 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia", "src\Semi.Avalonia\Semi.Avalonia.csproj", "{90D0B063-BC64-40AB-A56C-AC11909CF410}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{B1E6A7D4-0AFB-4D32-9969-5FBDAC0CFF3E}"
ProjectSection(SolutionItems) = preProject
demo\Directory.Build.props = demo\Directory.Build.props
demo\global.json = demo\global.json
src\Package.props = src\Package.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub Action", "GitHub Action", "{318534A1-1CC3-40FB-B4AE-736F94465232}"
ProjectSection(SolutionItems) = preProject
.github\workflows\deploy.yml = .github\workflows\deploy.yml
.github\workflows\pack.yml = .github\workflows\pack.yml
.github\workflows\pack-nightly.yml = .github\workflows\pack-nightly.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\release-tag.yml = .github\workflows\release-tag.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{43091528-9509-43CB-A003-9C5C11E96DD6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Desktop", "demo\Semi.Avalonia.Demo.Desktop\Semi.Avalonia.Demo.Desktop.csproj", "{2ADCA724-2B6D-46EC-87F7-604D7918B89A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Web", "demo\Semi.Avalonia.Demo.Web\Semi.Avalonia.Demo.Web.csproj", "{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo", "demo\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj", "{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.DataGrid", "src\Semi.Avalonia.DataGrid\Semi.Avalonia.DataGrid.csproj", "{8A90C292-8761-4F70-8E1F-EFC097FEADB3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.ColorPicker", "src\Semi.Avalonia.ColorPicker\Semi.Avalonia.ColorPicker.csproj", "{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Semi.Avalonia.Demo.Android", "demo\Semi.Avalonia.Demo.Android\Semi.Avalonia.Demo.Android.csproj", "{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.Demo.Drm", "demo\Semi.Avalonia.Demo.Drm\Semi.Avalonia.Demo.Drm.csproj", "{86D93406-412A-4429-93B2-92AAD0407784}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.TreeDataGrid", "src\Semi.Avalonia.TreeDataGrid\Semi.Avalonia.TreeDataGrid.csproj", "{398D2998-0835-41F5-99A3-608CAB8051E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Semi.Avalonia.TreeDataGrid.Demo", "demo\Semi.Avalonia.TreeDataGrid.Demo\Semi.Avalonia.TreeDataGrid.Demo.csproj", "{6178B545-4BB6-458C-A27C-EE11F3885D38}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90D0B063-BC64-40AB-A56C-AC11909CF410}.Release|Any CPU.Build.0 = Release|Any CPU
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ADCA724-2B6D-46EC-87F7-604D7918B89A}.Release|Any CPU.Build.0 = Release|Any CPU
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0}.Release|Any CPU.Build.0 = Release|Any CPU
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0}.Release|Any CPU.Build.0 = Release|Any CPU
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A90C292-8761-4F70-8E1F-EFC097FEADB3}.Release|Any CPU.Build.0 = Release|Any CPU
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B64C2F2-FDCD-48E4-AB9D-7CCC63B006CA}.Release|Any CPU.Build.0 = Release|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F}.Release|Any CPU.Build.0 = Release|Any CPU
{86D93406-412A-4429-93B2-92AAD0407784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86D93406-412A-4429-93B2-92AAD0407784}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86D93406-412A-4429-93B2-92AAD0407784}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86D93406-412A-4429-93B2-92AAD0407784}.Release|Any CPU.Build.0 = Release|Any CPU
{398D2998-0835-41F5-99A3-608CAB8051E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{398D2998-0835-41F5-99A3-608CAB8051E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{398D2998-0835-41F5-99A3-608CAB8051E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{398D2998-0835-41F5-99A3-608CAB8051E2}.Release|Any CPU.Build.0 = Release|Any CPU
{6178B545-4BB6-458C-A27C-EE11F3885D38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6178B545-4BB6-458C-A27C-EE11F3885D38}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6178B545-4BB6-458C-A27C-EE11F3885D38}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6178B545-4BB6-458C-A27C-EE11F3885D38}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2ADCA724-2B6D-46EC-87F7-604D7918B89A} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{69A2C77D-6DB7-4AE4-B179-D1F5CF5E2DF0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{D789AEDB-EBDF-4450-8E8E-B4A03FB257B0} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{0C81FC1C-5D2D-478A-9876-923A0C85EC2F} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{86D93406-412A-4429-93B2-92AAD0407784} = {43091528-9509-43CB-A003-9C5C11E96DD6}
{6178B545-4BB6-458C-A27C-EE11F3885D38} = {43091528-9509-43CB-A003-9C5C11E96DD6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7CA41ED3-2CED-40CC-AA21-28C3B42B1E86}
EndGlobalSection
EndGlobal

28
Semi.Avalonia.slnx Normal file
View File

@@ -0,0 +1,28 @@
<Solution>
<Folder Name="/Demo/">
<Project Path="demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj"/>
<Project Path="demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj"/>
<Project Path="demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj"/>
<Project Path="demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj"/>
<Project Path="demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj"/>
</Folder>
<Folder Name="/GitHub Action/">
<File Path=".github/workflows/deploy.yml"/>
<File Path=".github/workflows/pack-nightly.yml"/>
<File Path=".github/workflows/pack.yml"/>
<File Path=".github/workflows/publish.yml"/>
<File Path=".github/workflows/release-tag.yml"/>
</Folder>
<Folder Name="/Solution Items/Demo/">
<File Path="demo/Directory.Packages.props"/>
<File Path="demo/global.json"/>
</Folder>
<Folder Name="/Solution Items/Package/">
<File Path="src/Directory.Packages.props"/>
<File Path="src/Directory.Build.props"/>
</Folder>
<Project Path="src/Semi.Avalonia.ColorPicker/Semi.Avalonia.ColorPicker.csproj"/>
<Project Path="src/Semi.Avalonia.DataGrid/Semi.Avalonia.DataGrid.csproj"/>
<Project Path="src/Semi.Avalonia.TreeDataGrid/Semi.Avalonia.TreeDataGrid.csproj"/>
<Project Path="src/Semi.Avalonia/Semi.Avalonia.csproj"/>
</Solution>

View File

@@ -1,7 +0,0 @@
<Project>
<PropertyGroup>
<AvaloniaVersion>11.2.5</AvaloniaVersion>
<DataGridVersion>11.2.5</DataGridVersion>
<CommunityToolkitVersion>8.4.0</CommunityToolkitVersion>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,27 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<AvaloniaVersion>11.3.10</AvaloniaVersion>
<DataGridVersion>11.3.10</DataGridVersion>
<SkiaSharpVersion>3.119.1</SkiaSharpVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="Avalonia.iOS" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersion)"/>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(DataGridVersion)"/>
<PackageVersion Include="SkiaSharp" Version="$(SkiaSharpVersion)"/>
<PackageVersion Include="SkiaSharp.NativeAssets.WebAssembly" Version="$(SkiaSharpVersion)"/>
<PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.2.0"/>
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0"/>
<PackageVersion Include="Irihi.Avalonia.Shared" Version="0.3.1"/>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
using Avalonia;
using Avalonia.Media;
namespace Semi.Avalonia.Demo.Android;
public static class AvaloniaAppBuilderExtensions
{
private static string DefaultFontFamily => "avares://Semi.Avalonia.Demo.Android/Assets#Source Han Sans CN";
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) =>
builder.With(new FontManagerOptions
{
DefaultFamilyName = DefaultFontFamily,
FontFallbacks = [new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) }]
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 717 B

View File

@@ -1,5 +1,6 @@
using Android.App;
using Android.Content.PM;
using Avalonia;
using Avalonia.Android;
namespace Semi.Avalonia.Demo.Android;
@@ -13,4 +14,9 @@ namespace Semi.Avalonia.Demo.Android;
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
public class MainActivity : AvaloniaMainActivity<App>
{
protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder)
.WithSourceHanSansCNFont();
}
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-android</TargetFramework>
<TargetFramework>net10.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<ApplicationId>com.irihitech.Semi.Avalonia</ApplicationId>
@@ -14,14 +14,13 @@
</PropertyGroup>
<ItemGroup>
<AndroidResource Include="Icon.png">
<Link>Resources\drawable\Icon.png</Link>
</AndroidResource>
<AndroidResource Include="Icon.png" Link="Resources\drawable\Icon.png"/>
<AvaloniaResource Include="..\Fonts\*" Link="Assets\Fonts\%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Android" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.1"/>
<PackageReference Include="Avalonia.Android"/>
<PackageReference Include="Xamarin.AndroidX.Core.SplashScreen"/>
</ItemGroup>
<ItemGroup>

View File

@@ -4,9 +4,9 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
<!-- Uncomment below to enable Native AOT compilation-->
<!--<PublishAot>true</PublishAot>-->
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
@@ -23,7 +23,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Desktop"/>
</ItemGroup>
<ItemGroup>

View File

@@ -63,7 +63,7 @@ private static void SilenceConsole()
6. Publish the app to Linux
```bash
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc /p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
```
Add the following code to the csproj file for AOT publishing

View File

@@ -63,7 +63,7 @@ private static void SilenceConsole()
6. 发布程序到Linux
```bash
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
dotnet publish demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj -c Release -r linux-x64 --sc /p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
```
AOT发布需要在csproj文件中添加以下代码

View File

@@ -4,9 +4,9 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
<!-- Uncomment below to enable Native AOT compilation-->
<!--<PublishAot>true</PublishAot>-->
<!--<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>-->
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
@@ -23,8 +23,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.LinuxFramebuffer" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Desktop"/>
<PackageReference Include="Avalonia.LinuxFramebuffer"/>
</ItemGroup>
<ItemGroup>

View File

@@ -1,17 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
<PropertyGroup>
<TargetFramework>net8.0-browser</TargetFramework>
<TargetFramework>net10.0-browser</TargetFramework>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**"/>
<AvaloniaResource Include="..\Fonts\*" Link="Assets\Fonts\%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Browser"/>
<PackageReference Include="SkiaSharp"/>
<PackageReference Include="SkiaSharp.NativeAssets.WebAssembly"/>
</ItemGroup>
<ItemGroup>

View File

@@ -1,33 +1,49 @@
<Application
Name="Semi Avalonia Demo"
x:Class="Semi.Avalonia.Demo.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"
x:DataType="viewModels:ApplicationViewModel"
xmlns:semi="https://irihi.tech/semi"
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels">
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
x:DataType="vm:ApplicationViewModel">
<Application.Styles>
<!-- You can still reference in old way. -->
<!-- <StyleInclude Source="avares://Semi.Avalonia/Index.axaml" /> -->
<semi:SemiTheme Locale="zh-CN" />
<semi:SemiPopupAnimations />
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
<semi:ColorPickerSemiTheme />
<semi:DataGridSemiTheme />
<semi:TreeDataGridSemiTheme />
</Application.Styles>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceInclude
Source="Themes/_index.axaml" />
<ResourceInclude Source="Themes/_index.axaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
<NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem
Header="About Us"
Command="{Binding JumpToCommand}"
CommandParameter="{Binding $self.Header}" />
</NativeMenu>
</NativeMenu.Menu>
<TrayIcon.Icons>
<TrayIcons>
<TrayIcon Icon="/Assets/irihi.ico" MacOSProperties.IsTemplateIcon="true" ToolTipText="Semi Avalonia Demo">
<TrayIcon
Icon="{OnPlatform Default=/Assets/irihi.ico, macOS=/Assets/irihi2.ico}"
MacOSProperties.IsTemplateIcon="true"
Command="{Binding ActivateCommand}"
ToolTipText="Semi Avalonia Demo">
<TrayIcon.Menu>
<NativeMenu>
<NativeMenuItem Header="Exit" Command="{Binding ExitCommand}" />
<NativeMenuItem
Header="About Us"
Command="{Binding JumpToCommand}"
CommandParameter="{Binding $self.Header}" />
<NativeMenuItem
Header="Exit"
Command="{Binding ExitCommand}" />
</NativeMenu>
</TrayIcon.Menu>
</TrayIcon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

View File

@@ -5,8 +5,8 @@ namespace Semi.Avalonia.Demo.Constant;
public static class ColorTokens
{
public static IReadOnlyList<Tuple<string, string>> PrimaryTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> PrimaryTokens { get; } =
[
new("SemiColorPrimary", "Primary"),
new("SemiColorPrimaryPointerover", "Primary Pointerover"),
new("SemiColorPrimaryActive", "Primary Active"),
@@ -14,130 +14,156 @@ public static class ColorTokens
new("SemiColorPrimaryLight", "Primary Light"),
new("SemiColorPrimaryLightPointerover", "Primary Light Pointerover"),
new("SemiColorPrimaryLightActive", "Primary Light Active"),
};
];
public static IReadOnlyList<Tuple<string, string>> SecondaryTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> SecondaryTokens { get; } =
[
new("SemiColorSecondary", "Secondary"),
new("SemiColorSecondaryPointerover", "Secondary Pointerover"),
new("SemiColorSecondaryActive", "Secondary Active"),
new("SemiColorSecondaryDisabled", "Secondary Disabled"),
new("SemiColorSecondaryLight", "Secondary Light"),
new("SemiColorSecondaryLightPointerover", "Secondary Light Pointerover"),
new("SemiColorSecondaryLightActive", "Secondary Light Active"),
};
new("SemiColorSecondaryLightActive", "Secondary Light Active")
];
public static IReadOnlyList<Tuple<string, string>> TertiaryTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> TertiaryTokens { get; } =
[
new("SemiColorTertiary", "Tertiary"),
new("SemiColorTertiaryPointerover", "Tertiary Pointerover"),
new("SemiColorTertiaryActive", "Tertiary Active"),
new("SemiColorTertiaryLight", "Tertiary Light"),
new("SemiColorTertiaryLightPointerover", "Tertiary Light Pointerover"),
new("SemiColorTertiaryLightActive", "Tertiary Light Active"),
};
new("SemiColorTertiaryLightActive", "Tertiary Light Active")
];
public static IReadOnlyList<Tuple<string, string>> InformationTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> InformationTokens { get; } =
[
new("SemiColorInformation", "Information"),
new("SemiColorInformationPointerover", "Information Pointerover"),
new("SemiColorInformationActive", "Information Active"),
new("SemiColorInformationDisabled", "Information Disabled"),
new("SemiColorInformationLight", "Information Light"),
new("SemiColorInformationLightPointerover", "Information Light Pointerover"),
new("SemiColorInformationLightActive", "Information Light Active"),
};
new("SemiColorInformationLightActive", "Information Light Active")
];
public static IReadOnlyList<Tuple<string, string>> SuccessTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> SuccessTokens { get; } =
[
new("SemiColorSuccess", "Success"),
new("SemiColorSuccessPointerover", "Success Pointerover"),
new("SemiColorSuccessActive", "Success Active"),
new("SemiColorSuccessDisabled", "Success Disabled"),
new("SemiColorSuccessLight", "Success Light"),
new("SemiColorSuccessLightPointerover", "Success Light Pointerover"),
new("SemiColorSuccessLightActive", "Success Light Active"),
};
new("SemiColorSuccessLightActive", "Success Light Active")
];
public static IReadOnlyList<Tuple<string, string>> WarningTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> WarningTokens { get; } =
[
new("SemiColorWarning", "Warning"),
new("SemiColorWarningPointerover", "Warning Pointerover"),
new("SemiColorWarningActive", "Warning Active"),
new("SemiColorWarningLight", "Warning Light"),
new("SemiColorWarningLightPointerover", "Warning Light Pointerover"),
new("SemiColorWarningLightActive", "Warning Light Active"),
};
new("SemiColorWarningLightActive", "Warning Light Active")
];
public static IReadOnlyList<Tuple<string, string>> DangerTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> DangerTokens { get; } =
[
new("SemiColorDanger", "Danger"),
new("SemiColorDangerPointerover", "Danger Pointerover"),
new("SemiColorDangerActive", "Danger Active"),
new("SemiColorDangerLight", "Danger Light"),
new("SemiColorDangerLightPointerover", "Danger Light Pointerover"),
new("SemiColorDangerLightActive", "Danger Light Active"),
};
new("SemiColorDangerLightActive", "Danger Light Active")
];
public static IReadOnlyList<Tuple<string, string>> TextTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> AIGeneralTokens { get; } =
[
new("SemiColorAIGeneral", "AI General"),
new("SemiColorAIGeneralPointerover", "AI General Pointerover"),
new("SemiColorAIGeneralActive", "AI General Active"),
new("SemiColorAIGeneralDisabled", "AI General Disabled")
];
public static IReadOnlyList<Tuple<string, string>> AIPurpleTokens { get; } =
[
new("SemiColorAIPurple", "AI Purple"),
new("SemiColorAIPurplePointerover", "AI Purple Pointerover"),
new("SemiColorAIPurpleActive", "AI Purple Active"),
new("SemiColorAIPurpleDisabled", "AI Purple Disabled")
];
public static IReadOnlyList<Tuple<string, string>> AIBackgroundTokens { get; } =
[
new("SemiColorAIBackgroundBottom", "AI Bottom Background"),
new("SemiColorAIBackgroundBottomPointerover", "AI Bottom Background Pointerover"),
new("SemiColorAIBackgroundBottomActive", "AI Bottom Background Active"),
new("SemiColorAIBackgroundTop", "AI Top Background"),
new("SemiColorAIBackgroundTopPointerover", "AI Top Background Pointerover"),
new("SemiColorAIBackgroundTopActive", "AI Top Background Active"),
];
public static IReadOnlyList<Tuple<string, string>> TextTokens { get; } =
[
new("SemiColorText0", "Text 0"),
new("SemiColorText1", "Text 1"),
new("SemiColorText2", "Text 2"),
new("SemiColorText3", "Text 3"),
};
new("SemiColorText3", "Text 3")
];
public static IReadOnlyList<Tuple<string, string>> LinkTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> LinkTokens { get; } =
[
new("SemiColorLink", "Link"),
new("SemiColorLinkPointerover", "Link Pointerover"),
new("SemiColorLinkActive", "Link Active"),
new("SemiColorLinkVisited", "Link Visited"),
};
new("SemiColorLinkVisited", "Link Visited")
];
public static IReadOnlyList<Tuple<string, string>> BackgroundTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> BackgroundTokens { get; } =
[
new("SemiColorBackground0", "Background 0"),
new("SemiColorBackground1", "Background 1"),
new("SemiColorBackground2", "Background 2"),
new("SemiColorBackground3", "Background 3"),
new("SemiColorBackground4", "Background 4"),
};
new("SemiColorBackground4", "Background 4")
];
public static IReadOnlyList<Tuple<string, string>> FillTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> FillTokens { get; } =
[
new("SemiColorFill0", "Fill 0"),
new("SemiColorFill1", "Fill 1"),
new("SemiColorFill2", "Fill 2"),
};
new("SemiColorFill2", "Fill 2")
];
public static IReadOnlyList<Tuple<string, string>> BorderTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> BorderTokens { get; } =
[
new("SemiColorBorder", "Border"),
new("SemiColorFocusBorder", "Focus Border"),
};
new("SemiColorFocusBorder", "Focus Border")
];
public static IReadOnlyList<Tuple<string, string>> DisabledTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> DisabledTokens { get; } =
[
new("SemiColorDisabledText", "Disabled Text"),
new("SemiColorDisabledBorder", "Disabled Border"),
new("SemiColorDisabledBackground", "Disabled Background"),
new("SemiColorDisabledFill", "Disabled Fill"),
};
new("SemiColorDisabledFill", "Disabled Fill")
];
public static IReadOnlyList<Tuple<string, string>> OtherTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> OtherTokens { get; } =
[
new("SemiColorWhite", "White"),
new("SemiColorBlack", "Black"),
new("SemiColorNavBackground", "Navigation Background"),
new("SemiColorOverlayBackground", "Overlay Background"),
new("SemiColorHighlightBackground", "Highlight Background"),
new("SemiColorHighlight", "Highlight Text"),
};
new("SemiColorHighlight", "Highlight Text")
];
public static IReadOnlyList<Tuple<string, string>> ShadowTokens { get; } = new List<Tuple<string, string>>
{
public static IReadOnlyList<Tuple<string, string>> ShadowTokens { get; } =
[
new("SemiColorShadow", "Shadow"),
new("SemiShadowElevated", "Shadow Elevated"),
};
new("SemiShadowElevated", "Shadow Elevated")
];
}

View File

@@ -92,6 +92,12 @@ public class ColorDetailControl : TemplatedControl
Hex2 = hex2 as string;
OpacityNumber = brush.Opacity.ToString(CultureInfo.InvariantCulture);
}
else
{
Hex = null;
Hex2 = null;
OpacityNumber = null;
}
}
public async Task Copy(object o)

View File

@@ -5,7 +5,7 @@ using Avalonia;
using Avalonia.Data.Converters;
using Avalonia.Metadata;
namespace Semi.Avalonia.TreeDataGrid.Demo.Converters;
namespace Semi.Avalonia.Demo.Converters;
public class FileIconConverter : IMultiValueConverter
{

View File

@@ -0,0 +1,236 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Pages.AboutUs"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:collections="clr-namespace:Avalonia.Collections;assembly=Avalonia.Base"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:iri="https://irihi.tech/shared"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
x:DataType="vm:AboutUsViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<collections:AvaloniaList x:Key="CanvasPalette" x:TypeArguments="Color">
<Color>#FFFDB7A5</Color>
<Color>#FFF6A0B5</Color>
<Color>#FFDD9BE0</Color>
<Color>#FFC4A7E9</Color>
<Color>#FFA7B3E1</Color>
<Color>#FF98CDFD</Color>
<Color>#FF95D8F8</Color>
</collections:AvaloniaList>
<LinearGradientBrush x:Key="TileTitleForeground" StartPoint="">
<GradientStop Offset="0.0" Color="#FFA20B48" />
<GradientStop Offset="0.3" Color="#FF71168A" />
<GradientStop Offset="0.6" Color="#FF46259E" />
<GradientStop Offset="1.0" Color="#FF28348C" />
</LinearGradientBrush>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<collections:AvaloniaList x:Key="CanvasPalette" x:TypeArguments="Color">
<Color>#FFB42019</Color>
<Color>#FFA41751</Color>
<Color>#FF731F8A</Color>
<Color>#FF582EA0</Color>
<Color>#FF29368E</Color>
<Color>#FF135CB8</Color>
<Color>#FF0366A9</Color>
</collections:AvaloniaList>
<LinearGradientBrush x:Key="TileTitleForeground">
<GradientStop Offset="0.0" Color="#FFF7A8BC" />
<GradientStop Offset="0.3" Color="#FFDDA0E1" />
<GradientStop Offset="0.6" Color="#FFBEADE9" />
<GradientStop Offset="1.0" Color="#FFA7B4E2" />
</LinearGradientBrush>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<ControlTheme x:Key="TileButton" TargetType="Button">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="Padding" Value="24" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<ControlTemplate>
<Border
Padding="0"
Classes="Hover"
Cursor="Hand"
Theme="{DynamicResource CardBorder}">
<Border.Transitions>
<Transitions>
<BrushTransition Property="BorderBrush" Duration="0.5" />
</Transitions>
</Border.Transitions>
<ContentPresenter
Padding="{TemplateBinding Padding}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
</ControlTemplate>
</Setter>
<Style Selector="^:pointerover /template/ Border">
<Setter Property="BorderBrush" Value="{DynamicResource TileTitleForeground}" />
</Style>
</ControlTheme>
</ResourceDictionary>
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="TextBlock.TileTitle">
<Setter Property="FontWeight" Value="700" />
<Setter Property="FontSize" Value="24" />
<Setter Property="Margin" Value="0 0 0 8" />
<Setter Property="Foreground" Value="{DynamicResource TileTitleForeground}" />
</Style>
</UserControl.Styles>
<Grid RowDefinitions="*, Auto">
<ScrollViewer>
<StackPanel>
<Grid
Margin="0,96,0,48"
HorizontalAlignment="Center"
ColumnDefinitions="*, *"
RowDefinitions="*, *">
<iri:IrihiLogo
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="0"
Fill="{DynamicResource TextBlockSecondaryForeground}"
Width="96"
Margin="0,0,24,0"
VerticalAlignment="Center" />
<TextBlock
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Classes="Secondary"
FontSize="48"
FontWeight="700"
Text="铱泓科技" />
<TextBlock
Grid.Row="1"
Grid.Column="1"
Margin="12,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Classes="Secondary"
FontSize="16"
Text="IRIHI Technology" />
</Grid>
<TextBlock
HorizontalAlignment="Center"
Classes="Tertiary"
FontSize="20"
FontWeight="700"
Text="聚焦生产力的美学进化" />
<TextBlock
HorizontalAlignment="Center"
Classes="Tertiary"
FontSize="20"
Text="Aesthetic Evolution of Productivity" />
<UniformGrid
MaxWidth="810"
Margin="24"
HorizontalAlignment="Center"
Columns="2">
<Button
Margin="8"
Command="{Binding NavigateCommand}"
CommandParameter="semi"
Theme="{DynamicResource TileButton}">
<StackPanel HorizontalAlignment="Left">
<TextBlock Classes="TileTitle" Text="Semi" />
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
<Label Theme="{DynamicResource TagLabel}" Classes="Blue Ghost">Open Source</Label>
</StackPanel>
<TextBlock Text="开箱即用的独立主题库" />
<TextBlock Text="A ready-to-use standalone theme library" />
</StackPanel>
</Button>
<Button
Margin="8"
Command="{Binding NavigateCommand}"
CommandParameter="ursa"
Theme="{DynamicResource TileButton}">
<StackPanel HorizontalAlignment="Left">
<TextBlock Classes="TileTitle" Text="Ursa" />
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
<Label Theme="{DynamicResource TagLabel}" Classes="Blue Ghost">Open Source</Label>
</StackPanel>
<TextBlock Text="高性能企业级桌面客户端控件库" />
<TextBlock Text="High-performance enterprise level control library for desktop apps" />
</StackPanel>
</Button>
<Button
Margin="8"
Command="{Binding NavigateCommand}"
CommandParameter="mantra"
Theme="{DynamicResource TileButton}">
<StackPanel HorizontalAlignment="Left">
<TextBlock Classes="TileTitle" Text="Mantra" />
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
<Label Theme="{DynamicResource TagLabel}" Classes="Purple Ghost">Commercial</Label>
</StackPanel>
<TextBlock Text="高性能文字排版渲染控件库" />
<TextBlock Text="High-performance typography control library" />
</StackPanel>
</Button>
<Button
Margin="8"
Command="{Binding NavigateCommand}"
CommandParameter="huska"
Theme="{DynamicResource TileButton}">
<StackPanel HorizontalAlignment="Left">
<TextBlock Classes="TileTitle" Text="Huska" />
<StackPanel Orientation="Horizontal" Margin="0 0 0 8">
<Label Theme="{DynamicResource TagLabel}" Classes="Purple Ghost">Commercial</Label>
</StackPanel>
<TextBlock Text="手绘风格主题库" />
<TextBlock Text="Hand-drawing theme library" />
</StackPanel>
</Button>
</UniformGrid>
</StackPanel>
</ScrollViewer>
<StackPanel
Grid.Row="1"
Margin="0,16"
Spacing="32"
HorizontalAlignment="Center"
Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<HyperlinkButton
Classes="WithIcon"
VerticalAlignment="Center"
Content="Homepage"
NavigateUri="https://irihi.tech">
<HyperlinkButton.Styles>
<Style Selector=".WithIcon /template/ PathIcon">
<Setter Property="Data" Value="{StaticResource SemiIconHome}" />
</Style>
</HyperlinkButton.Styles>
</HyperlinkButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<HyperlinkButton
Classes="WithIcon"
Content="GitHub"
NavigateUri="https://github.com/irihitech">
<HyperlinkButton.Styles>
<Style Selector=".WithIcon /template/ PathIcon">
<Setter Property="Data" Value="{StaticResource SemiIconGithubLogo}" />
</Style>
</HyperlinkButton.Styles>
</HyperlinkButton>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>

View File

@@ -0,0 +1,24 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;
public partial class AboutUs : UserControl
{
public AboutUs()
{
InitializeComponent();
this.DataContext = new AboutUsViewModel();
}
protected override void OnLoaded(RoutedEventArgs e)
{
base.OnLoaded(e);
if (this.DataContext is AboutUsViewModel vm)
{
var launcher = TopLevel.GetTopLevel(this)?.Launcher;
vm.Launcher = launcher;
}
}
}

View File

@@ -3,15 +3,14 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Semi.Avalonia.Demo.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="False"
x:DataType="local:AutoCompleteBoxDemoViewModel"
x:DataType="vm:AutoCompleteBoxDemoViewModel"
mc:Ignorable="d">
<Design.DataContext>
<local:AutoCompleteBoxDemoViewModel />
<vm:AutoCompleteBoxDemoViewModel />
</Design.DataContext>
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel.Styles>
@@ -21,7 +20,7 @@
<Binding Path="States" />
</Setter>
<Setter Property="ItemTemplate">
<DataTemplate DataType="local:StateData">
<DataTemplate DataType="vm:StateData">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</Setter>
@@ -30,40 +29,40 @@
<AutoCompleteBox
Watermark="Please select a State"
ValueMemberBinding="{Binding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Classes="Large"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Classes="Small"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Classes="Bordered"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
IsEnabled="False"
Watermark="Disabled"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
InnerLeftContent="https://"
InnerRightContent=".com"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<StackPanel Orientation="Horizontal">
<AutoCompleteBox
Width="100"
Classes="Large"
Watermark="Large"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Width="100"
Watermark="Default"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Width="100"
Classes="Small"
Watermark="Small"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
@@ -71,17 +70,17 @@
Width="100"
IsEnabled="False"
Watermark="Disabled"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Width="100"
Classes="Bordered"
Watermark="Bordered"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
<AutoCompleteBox
Width="100"
Classes="Bordered"
IsEnabled="False"
ValueMemberBinding="{ReflectionBinding Name}" />
ValueMemberBinding="{Binding Name,DataType=vm:StateData}" />
</StackPanel>
</StackPanel>

View File

@@ -1,9 +1,5 @@
using System.Collections.ObjectModel;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using System.Collections.Generic;
using CommunityToolkit.Mvvm.ComponentModel;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;
@@ -14,86 +10,4 @@ public partial class AutoCompleteBoxDemo : UserControl
InitializeComponent();
this.DataContext = new AutoCompleteBoxDemoViewModel();
}
}
public class AutoCompleteBoxDemoViewModel: ObservableObject
{
public ObservableCollection<StateData> States { get; set; }
public AutoCompleteBoxDemoViewModel()
{
States = new ObservableCollection<StateData>(GetStates());
}
private static List<StateData> GetStates()
{
return new List<StateData>
{
new StateData("Alabama", "AL", "Montgomery"),
new StateData("Alaska", "AK", "Juneau"),
new StateData("Arizona", "AZ", "Phoenix"),
new StateData("Arkansas", "AR", "Little Rock"),
new StateData("California", "CA", "Sacramento"),
new StateData("Colorado", "CO", "Denver"),
new StateData("Connecticut", "CT", "Hartford"),
new StateData("Delaware", "DE", "Dover"),
new StateData("Florida", "FL", "Tallahassee"),
new StateData("Georgia", "GA", "Atlanta"),
new StateData("Hawaii", "HI", "Honolulu"),
new StateData("Idaho", "ID", "Boise"),
new StateData("Illinois", "IL", "Springfield"),
new StateData("Indiana", "IN", "Indianapolis"),
new StateData("Iowa", "IA", "Des Moines"),
new StateData("Kansas", "KS", "Topeka"),
new StateData("Kentucky", "KY", "Frankfort"),
new StateData("Louisiana", "LA", "Baton Rouge"),
new StateData("Maine", "ME", "Augusta"),
new StateData("Maryland", "MD", "Annapolis"),
new StateData("Massachusetts", "MA", "Boston"),
new StateData("Michigan", "MI", "Lansing"),
new StateData("Minnesota", "MN", "St. Paul"),
new StateData("Mississippi", "MS", "Jackson"),
new StateData("Missouri", "MO", "Jefferson City"),
new StateData("Montana", "MT", "Helena"),
new StateData("Nebraska", "NE", "Lincoln"),
new StateData("Nevada", "NV", "Carson City"),
new StateData("New Hampshire", "NH", "Concord"),
new StateData("New Jersey", "NJ", "Trenton"),
new StateData("New Mexico", "NM", "Santa Fe"),
new StateData("New York", "NY", "Albany"),
new StateData("North Carolina", "NC", "Raleigh"),
new StateData("North Dakota", "ND", "Bismarck"),
new StateData("Ohio", "OH", "Columbus"),
new StateData("Oklahoma", "OK", "Oklahoma City"),
new StateData("Oregon", "OR", "Salem"),
new StateData("Pennsylvania", "PA", "Harrisburg"),
new StateData("Rhode Island", "RI", "Providence"),
new StateData("South Carolina", "SC", "Columbia"),
new StateData("South Dakota", "SD", "Pierre"),
new StateData("Tennessee", "TN", "Nashville"),
new StateData("Texas", "TX", "Austin"),
new StateData("Utah", "UT", "Salt Lake City"),
new StateData("Vermont", "VT", "Montpelier"),
new StateData("Virginia", "VA", "Richmond"),
new StateData("Washington", "WA", "Olympia"),
new StateData("West Virginia", "WV", "Charleston"),
new StateData("Wisconsin", "WI", "Madison"),
new StateData("Wyoming", "WY", "Cheyenne"),
};
}
}
public class StateData
{
public string Name { get; private set; }
public string Abbreviation { get; private set; }
public string Capital { get; private set; }
public StateData(string name, string abbreviation, string capital)
{
Name = name;
Abbreviation = abbreviation;
Capital = capital;
}
}

View File

@@ -18,4 +18,4 @@
<TextBlock>Shadow on Pointerover</TextBlock>
</Border>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -6,174 +6,369 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel HorizontalAlignment="Left" Spacing="8">
<StackPanel.Styles>
<Style Selector="SplitButton">
<Setter Property="Flyout">
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</Setter>
</Style>
<Style Selector="DropDownButton">
<Setter Property="Flyout">
<MenuFlyout Placement="BottomEdgeAlignedRight">
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</Setter>
</Style>
<Style Selector="ToggleSplitButton">
<Setter Property="Flyout">
<MenuFlyout Placement="BottomEdgeAlignedRight">
<Style Selector="SplitButton,DropDownButton,ToggleSplitButton">
<Setter Property="Button.Flyout">
<MenuFlyout>
<MenuItem Header="Submit All" />
<MenuItem Header="Submit Updated" />
</MenuFlyout>
</Setter>
</Style>
</StackPanel.Styles>
<HeaderedContentControl
Theme="{StaticResource GroupBox}">
<HeaderedContentControl.Header>
<StackPanel Spacing="8">
<TextBlock Text="Button/RepeatButton Theme" />
<WrapPanel ItemSpacing="4">
<TextBlock Text="Theme:" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Light" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Solid" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Outline" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue Solid" Content="Borderless" />
</WrapPanel>
<WrapPanel ItemSpacing="4">
<TextBlock Text="Classes:" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Primary" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Secondary" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Tertiary" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Success" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Warning" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Danger" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl.Header>
<StackPanel HorizontalAlignment="Left" Spacing="16">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Default" />
<Button Content="Primary" Classes="Primary" />
<Button Content="Secondary" Classes="Secondary" />
<Button Content="Tertiary" Classes="Tertiary" />
<Button Content="Success" Classes="Success" />
<Button Content="Warning" Classes="Warning" />
<Button Content="Danger" Classes="Danger" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Default" Theme="{StaticResource SolidButton}" />
<Button Content="Primary" Classes="Primary" Theme="{StaticResource SolidButton}" />
<Button Content="Secondary" Classes="Secondary" Theme="{StaticResource SolidButton}" />
<Button Content="Tertiary" Classes="Tertiary" Theme="{StaticResource SolidButton}" />
<Button Content="Success" Classes="Success" Theme="{StaticResource SolidButton}" />
<Button Content="Warning" Classes="Warning" Theme="{StaticResource SolidButton}" />
<Button Content="Danger" Classes="Danger" Theme="{StaticResource SolidButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Default" Theme="{StaticResource OutlineButton}" />
<Button Content="Primary" Classes="Primary" Theme="{StaticResource OutlineButton}" />
<Button Content="Secondary" Classes="Secondary" Theme="{StaticResource OutlineButton}" />
<Button Content="Tertiary" Classes="Tertiary" Theme="{StaticResource OutlineButton}" />
<Button Content="Success" Classes="Success" Theme="{StaticResource OutlineButton}" />
<Button Content="Warning" Classes="Warning" Theme="{StaticResource OutlineButton}" />
<Button Content="Danger" Classes="Danger" Theme="{StaticResource OutlineButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Default" Theme="{StaticResource BorderlessButton}" />
<Button Content="Primary" Classes="Primary" Theme="{StaticResource BorderlessButton}" />
<Button Content="Secondary" Classes="Secondary" Theme="{StaticResource BorderlessButton}" />
<Button Content="Tertiary" Classes="Tertiary" Theme="{StaticResource BorderlessButton}" />
<Button Content="Success" Classes="Success" Theme="{StaticResource BorderlessButton}" />
<Button Content="Warning" Classes="Warning" Theme="{StaticResource BorderlessButton}" />
<Button Content="Danger" Classes="Danger" Theme="{StaticResource BorderlessButton}" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl>
<TextBlock>Light (Default)</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary">Primary</Button>
<Button Classes="Secondary">Secondary</Button>
<Button Classes="Tertiary">Tertiary</Button>
<Button Classes="Success">Success</Button>
<Button Classes="Warning">Warning</Button>
<Button Classes="Danger">Danger</Button>
<Button Classes="Danger" IsEnabled="False">Disabled</Button>
</StackPanel>
<TextBlock>Solid</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource SolidButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource SolidButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource SolidButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource SolidButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource SolidButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource SolidButton}">Danger</Button>
<Button
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource SolidButton}">
Disabled
</Button>
</StackPanel>
<TextBlock>Outline</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource OutlineButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource OutlineButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource OutlineButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource OutlineButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource OutlineButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}">Danger</Button>
<Button Classes="Danger" Theme="{DynamicResource OutlineButton}" IsEnabled="False">Disabled</Button>
</StackPanel>
<TextBlock>Borderless</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary" Theme="{DynamicResource BorderlessButton}">Primary</Button>
<Button Classes="Secondary" Theme="{DynamicResource BorderlessButton}">Secondary</Button>
<Button Classes="Tertiary" Theme="{DynamicResource BorderlessButton}">Tertiary</Button>
<Button Classes="Success" Theme="{DynamicResource BorderlessButton}">Success</Button>
<Button Classes="Warning" Theme="{DynamicResource BorderlessButton}">Warning</Button>
<Button Classes="Danger" Theme="{DynamicResource BorderlessButton}">Danger</Button>
<Button
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource BorderlessButton}">
Disabled
</Button>
</StackPanel>
<TextBlock>Disabled</TextBlock>
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
<Button IsEnabled="False">Light</Button>
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
</StackPanel>
<TextBlock>Size Classes</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<Button Classes="Primary Small">Small</Button>
<Button Classes="Primary">Default</Button>
<Button Classes="Primary Large">Large</Button>
</StackPanel>
<HeaderedContentControl
Theme="{StaticResource GroupBox}"
Header="Prohibited Status">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Light" IsEnabled="False" />
<Button Content="Solid" IsEnabled="False" Theme="{StaticResource SolidButton}" />
<Button Content="Outline" IsEnabled="False" Theme="{StaticResource OutlineButton}" />
<Button Content="Borderless" IsEnabled="False" Theme="{StaticResource BorderlessButton}" />
</WrapPanel>
</HeaderedContentControl>
<TextBlock>DropDownButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Primary" />
<DropDownButton Classes="Secondary" Content="Secondary" />
<DropDownButton Classes="Tertiary" Content="Tertiary" />
<DropDownButton Classes="Success" Content="Success" />
<DropDownButton Classes="Warning" Content="Warning" />
<DropDownButton Classes="Danger" Content="Danger" />
<DropDownButton
Classes="Danger"
Content="Disabled"
IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Content="Default" Classes="Success"/>
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success"/>
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success"/>
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success"/>
<DropDownButton Content="Default" Classes="Success" IsEnabled="False"/>
<DropDownButton Content="Solid" Theme="{DynamicResource SolidDropDownButton}" Classes="Success" IsEnabled="False"/>
<DropDownButton Content="Outline" Theme="{DynamicResource OutlineDropDownButton}" Classes="Success" IsEnabled="False"/>
<DropDownButton Content="Borderless" Theme="{DynamicResource BorderlessDropDownButton}" Classes="Success" IsEnabled="False"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<DropDownButton Classes="Small" Content="Small" />
<DropDownButton Content="Default" />
<DropDownButton Classes="Large" Content="Large" />
</StackPanel>
<HeaderedContentControl
Theme="{StaticResource GroupBox}">
<HeaderedContentControl.Header>
<StackPanel Spacing="8">
<WrapPanel ItemSpacing="4">
<TextBlock Text="Size Classes:" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Large" />
<Label Theme="{StaticResource TagLabel}" Classes="Blue" Content="Small" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl.Header>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Large" Classes="Large" />
<Button Content="Default" />
<Button Content="Small" Classes="Small" />
</WrapPanel>
</HeaderedContentControl>
<TextBlock>SplitButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Content="Primary" />
<SplitButton Classes="Secondary" Content="Secondary" />
<SplitButton Classes="Tertiary" Content="Tertiary" />
<SplitButton Classes="Success" Content="Success" />
<SplitButton Classes="Warning" Content="Warning" />
<SplitButton Classes="Danger" Content="Danger" />
<SplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Content="Default" Classes="Success" />
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" />
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" />
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" />
<SplitButton Content="Default" Classes="Success" IsEnabled="False" />
<SplitButton Content="Solid" Theme="{DynamicResource SolidSplitButton}" Classes="Success" IsEnabled="False" />
<SplitButton Content="Outline" Theme="{DynamicResource OutlineSplitButton}" Classes="Success" IsEnabled="False" />
<SplitButton Content="Borderless" Theme="{DynamicResource BorderlessSplitButton}" Classes="Success" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<SplitButton Classes="Small" Content="Small" />
<SplitButton Content="Default" />
<SplitButton Classes="Large" Content="Large" />
</StackPanel>
<HeaderedContentControl
Theme="{StaticResource GroupBox}">
<HeaderedContentControl.Header>
<StackPanel Spacing="8">
<TextBlock Text="AI style - Colorful Button" />
<WrapPanel ItemSpacing="4">
<TextBlock Text="Theme:" />
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Light" />
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Solid" />
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Outline" />
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient Solid" Content="Borderless" />
</WrapPanel>
<WrapPanel ItemSpacing="4">
<TextBlock Text="Classes:" />
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient" Content="Colorful Primary" />
<Label Theme="{StaticResource TagLabel}" Classes="Colorful Gradient" Content="Colorful Tertiary" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl.Header>
<StackPanel HorizontalAlignment="Left" Spacing="16">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Primary" Classes="Colorful Primary" />
<Button Content="Tertiary" Classes="Colorful Tertiary" />
<Button Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Primary" Classes="Colorful Primary" Theme="{StaticResource SolidButton}" />
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource SolidButton}" />
<Button Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource SolidButton}" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Primary" Classes="Colorful Primary" Theme="{StaticResource OutlineButton}" />
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource OutlineButton}" />
<Button Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource OutlineButton}" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<Button Content="Primary" Classes="Colorful Primary" Theme="{StaticResource BorderlessButton}" />
<Button Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource BorderlessButton}" />
<Button Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource BorderlessButton}" IsEnabled="False" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl>
<TextBlock>ToggleSplitButton</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Content="Primary" />
<ToggleSplitButton Classes="Secondary" Content="Secondary" />
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" />
<ToggleSplitButton Classes="Success" Content="Success" />
<ToggleSplitButton Classes="Warning" Content="Warning" />
<ToggleSplitButton Classes="Danger" Content="Danger" />
<ToggleSplitButton Classes="Danger" Content="Disabled" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Content="Default" Classes="Success" />
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" />
<ToggleSplitButton Content="Default" Classes="Success" IsEnabled="False" />
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<ToggleSplitButton Classes="Small" Content="Small" />
<ToggleSplitButton Content="Default" />
<ToggleSplitButton Classes="Large" Content="Large" />
</StackPanel>
<HeaderedContentControl
Theme="{StaticResource GroupBox}" Header="DropDownButton">
<StackPanel HorizontalAlignment="Left" Spacing="16">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Default" />
<DropDownButton Content="Primary" Classes="Primary" />
<DropDownButton Content="Secondary" Classes="Secondary" />
<DropDownButton Content="Tertiary" Classes="Tertiary" />
<DropDownButton Content="Success" Classes="Success" />
<DropDownButton Content="Warning" Classes="Warning" />
<DropDownButton Content="Danger" Classes="Danger" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Default" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Primary" Classes="Primary" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Success" Classes="Success" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Warning" Classes="Warning" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Danger" Classes="Danger" Theme="{StaticResource SolidDropDownButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Default" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Primary" Classes="Primary" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Success" Classes="Success" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Warning" Classes="Warning" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Danger" Classes="Danger" Theme="{StaticResource OutlineDropDownButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Default" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Primary" Classes="Primary" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Secondary" Classes="Secondary" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Success" Classes="Success" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Warning" Classes="Warning" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Danger" Classes="Danger" Theme="{StaticResource BorderlessDropDownButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Light" IsEnabled="False" />
<DropDownButton Content="Solid" IsEnabled="False" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Outline" IsEnabled="False" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Borderless" IsEnabled="False" Theme="{StaticResource BorderlessDropDownButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Large" Classes="Large" />
<DropDownButton Content="Default" />
<DropDownButton Content="Small" Classes="Small" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Primary" Classes="Colorful Primary" />
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" />
<DropDownButton Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource SolidDropDownButton}" />
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource SolidDropDownButton}" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource OutlineDropDownButton}" />
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource OutlineDropDownButton}" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<DropDownButton Content="Primary" Classes="Colorful Primary" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Tertiary" Classes="Colorful Tertiary" Theme="{StaticResource BorderlessDropDownButton}" />
<DropDownButton Content="Disabled" Classes="Colorful Primary" Theme="{StaticResource BorderlessDropDownButton}" IsEnabled="False" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl>
<HeaderedContentControl
Theme="{StaticResource GroupBox}" Header="SplitButton">
<StackPanel HorizontalAlignment="Left" Spacing="16">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<SplitButton Content="Default" />
<SplitButton Content="Primary" Classes="Primary" />
<SplitButton Content="Secondary" Classes="Secondary" />
<SplitButton Content="Tertiary" Classes="Tertiary" />
<SplitButton Content="Success" Classes="Success" />
<SplitButton Content="Warning" Classes="Warning" />
<SplitButton Content="Danger" Classes="Danger" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<SplitButton Content="Default" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Primary" Classes="Primary" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Secondary" Classes="Secondary" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Success" Classes="Success" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Warning" Classes="Warning" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Danger" Classes="Danger" Theme="{StaticResource SolidSplitButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<SplitButton Content="Default" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Primary" Classes="Primary" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Secondary" Classes="Secondary" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Success" Classes="Success" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Warning" Classes="Warning" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Danger" Classes="Danger" Theme="{StaticResource OutlineSplitButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<SplitButton Content="Default" Theme="{StaticResource BorderlessSplitButton}" />
<SplitButton Content="Primary" Classes="Primary" Theme="{StaticResource BorderlessSplitButton}" />
<SplitButton Content="Secondary" Classes="Secondary" Theme="{StaticResource BorderlessSplitButton}" />
<SplitButton Content="Tertiary" Classes="Tertiary" Theme="{StaticResource BorderlessSplitButton}" />
<SplitButton Content="Success" Classes="Success" Theme="{StaticResource BorderlessSplitButton}" />
<SplitButton Content="Warning" Classes="Warning" Theme="{StaticResource BorderlessSplitButton}" />
<SplitButton Content="Danger" Classes="Danger" Theme="{StaticResource BorderlessSplitButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<SplitButton Content="Light" IsEnabled="False" />
<SplitButton Content="Solid" IsEnabled="False" Theme="{StaticResource SolidSplitButton}" />
<SplitButton Content="Outline" IsEnabled="False" Theme="{StaticResource OutlineSplitButton}" />
<SplitButton Content="Borderless" IsEnabled="False" Theme="{StaticResource BorderlessSplitButton}" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<SplitButton Content="Large" Classes="Large" />
<SplitButton Content="Default" />
<SplitButton Content="Small" Classes="Small" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl>
<HeaderedContentControl
Theme="{StaticResource GroupBox}"
Header="ToggleSplitButton">
<StackPanel HorizontalAlignment="Left" Spacing="24">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleSplitButton Content="Default" />
<ToggleSplitButton Classes="Primary" Content="Primary" />
<ToggleSplitButton Classes="Secondary" Content="Secondary" />
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" />
<ToggleSplitButton Classes="Success" Content="Success" />
<ToggleSplitButton Classes="Warning" Content="Warning" />
<ToggleSplitButton Classes="Danger" Content="Danger" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleSplitButton Content="Default" IsChecked="True" />
<ToggleSplitButton Classes="Primary" Content="Primary" IsChecked="True" />
<ToggleSplitButton Classes="Secondary" Content="Secondary" IsChecked="True" />
<ToggleSplitButton Classes="Tertiary" Content="Tertiary" IsChecked="True" />
<ToggleSplitButton Classes="Success" Content="Success" IsChecked="True" />
<ToggleSplitButton Classes="Warning" Content="Warning" IsChecked="True" />
<ToggleSplitButton Classes="Danger" Content="Danger" IsChecked="True" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleSplitButton Content="Unchecked" Classes="Success" IsEnabled="False" />
<ToggleSplitButton Content="Checked" Classes="Success" IsChecked="True" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleSplitButton Content="Large" Classes="Large" />
<ToggleSplitButton Content="Default" />
<ToggleSplitButton Content="Small" Classes="Small" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl>
<HeaderedContentControl
Theme="{StaticResource GroupBox}" Header="ToggleButton">
<StackPanel HorizontalAlignment="Left" Spacing="16">
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Default" />
<ToggleButton Content="Primary" Classes="Primary" />
<ToggleButton Content="Secondary" Classes="Secondary" />
<ToggleButton Content="Tertiary" Classes="Tertiary" />
<ToggleButton Content="Success" Classes="Success" />
<ToggleButton Content="Warning" Classes="Warning" />
<ToggleButton Content="Danger" Classes="Danger" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Default" IsChecked="True" />
<ToggleButton Content="Primary" Classes="Primary" IsChecked="True" />
<ToggleButton Content="Secondary" Classes="Secondary" IsChecked="True" />
<ToggleButton Content="Tertiary" Classes="Tertiary" IsChecked="True" />
<ToggleButton Content="Success" Classes="Success" IsChecked="True" />
<ToggleButton Content="Warning" Classes="Warning" IsChecked="True" />
<ToggleButton Content="Danger" Classes="Danger" IsChecked="True" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Default" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Primary" Classes="Primary" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Secondary" Classes="Secondary" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Tertiary" Classes="Tertiary" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Success" Classes="Success" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Warning" Classes="Warning" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Danger" Classes="Danger" IsChecked="{x:Null}" IsThreeState="True" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Unchecked" IsEnabled="False" />
<ToggleButton Content="Checked" IsEnabled="False" IsChecked="True" />
<ToggleButton Content="Indeterminate" IsEnabled="False" IsChecked="{x:Null}" IsThreeState="True" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Large" Classes="Large" />
<ToggleButton Content="Default" />
<ToggleButton Content="Small" Classes="Small" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Primary" Classes="Colorful Primary" />
<ToggleButton Content="Tertiary" Classes="Colorful Tertiary" />
<ToggleButton Content="Disabled" Classes="Colorful Primary" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Primary" Classes="Colorful Primary" IsChecked="True" />
<ToggleButton Content="Tertiary" Classes="Colorful Tertiary" IsChecked="True" />
<ToggleButton Content="Disabled" Classes="Colorful Primary" IsChecked="True" IsEnabled="False" />
</WrapPanel>
<WrapPanel ItemSpacing="16" LineSpacing="16">
<ToggleButton Content="Primary" Classes="Colorful Primary" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Tertiary" Classes="Colorful Tertiary" IsChecked="{x:Null}" IsThreeState="True" />
<ToggleButton Content="Disabled" Classes="Colorful Primary" IsChecked="{x:Null}" IsThreeState="True" IsEnabled="False" />
</WrapPanel>
</StackPanel>
</HeaderedContentControl>
</StackPanel>
</ScrollViewer>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -8,6 +8,10 @@
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel Orientation="Horizontal">
<ToggleSwitch Name="showSpinCheck" IsChecked="True" Content="Show Button Spinner" />
<ToggleSwitch Name="allowSpinCheck" IsChecked="True" Content="Allow Spin" />
</StackPanel>
<ButtonSpinner
Height="30"
AllowSpin="{Binding #allowSpinCheck.IsChecked}"
@@ -32,4 +36,4 @@
Text="A.S.I.A" />
</ButtonSpinner>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,7 +1,5 @@
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -31,7 +29,6 @@ public partial class ButtonSpinnerDemo : UserControl
txtBox.Text = _mountains[value];
}
}
private readonly string[] _mountains = new[]

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -11,4 +11,4 @@
<Calendar />
<Calendar SelectionMode="SingleRange" />
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class CalendarDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -1,7 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -4,49 +4,54 @@
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:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
d:DesignHeight="800"
d:DesignWidth="800"
mc:Ignorable="d">
mc:Ignorable="d"
x:DataType="vm:ComboBoxDemoViewModel">
<Design.DataContext>
<pages:ComboBoxDemoViewModel />
<vm:ComboBoxDemoViewModel />
</Design.DataContext>
<StackPanel Spacing="20">
<StackPanel.Styles>
<Style Selector="ComboBox">
<Setter Property="Width" Value="300" />
<Setter Property="ItemsSource" Value="{Binding Items}" />
</Style>
</StackPanel.Styles>
<ScrollViewer>
<StackPanel Spacing="20">
<StackPanel.Styles>
<Style Selector="ComboBox">
<Setter Property="Width" Value="300" />
<Setter Property="ItemsSource" Value="{Binding Items}" />
</Style>
</StackPanel.Styles>
<ComboBox />
<ComboBox Classes="ClearButton" />
<ComboBox PlaceholderText="Please Select" />
<ComboBox IsEnabled="False" />
<ComboBox Classes="Large" IsEnabled="False" />
<ComboBox Classes="Small" />
<ComboBox Classes="Bordered" />
<ComboBox Classes="Bordered" IsEnabled="False" />
<ComboBox>
<ComboBox.SelectionBoxItemTemplate>
<DataTemplate DataType="x:String">
<ContentControl BorderThickness="1"
BorderBrush="Gold"
Content="{Binding}" />
</DataTemplate>
</ComboBox.SelectionBoxItemTemplate>
</ComboBox>
<ComboBox />
<ComboBox Classes="ClearButton" />
<ComboBox PlaceholderText="Please Select" />
<ComboBox IsEnabled="False" />
<ComboBox Classes="Large" IsEnabled="False" />
<ComboBox Classes="Small" />
<ComboBox Classes="Bordered" />
<ComboBox Classes="Bordered" IsEnabled="False" />
<ComboBox>
<ComboBox.SelectionBoxItemTemplate>
<DataTemplate DataType="x:String">
<ContentControl BorderThickness="1"
BorderBrush="Gold"
Content="{Binding}" />
</DataTemplate>
</ComboBox.SelectionBoxItemTemplate>
</ComboBox>
<StackPanel Orientation="Horizontal">
<ComboBox Width="100" Classes="Large" PlaceholderText="Large" />
<ComboBox Width="100" PlaceholderText="Default" />
<ComboBox Width="100" Classes="Small" PlaceholderText="Small" />
<StackPanel Orientation="Horizontal">
<ComboBox Width="100" Classes="Large" PlaceholderText="Large" />
<ComboBox Width="100" PlaceholderText="Default" />
<ComboBox Width="100" Classes="Small" PlaceholderText="Small" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ComboBox Width="100" IsEnabled="False" PlaceholderText="Disabled" />
<ComboBox Width="100" Classes="Bordered" PlaceholderText="Bordered" />
<ComboBox Width="100" Classes="Bordered" IsEnabled="False" />
</StackPanel>
<ToggleSwitch Name="toggle" IsChecked="True" Content="IsEditable" />
<ComboBox IsEditable="{Binding #toggle.IsChecked}" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<ComboBox Width="100" IsEnabled="False" PlaceholderText="Disabled" />
<ComboBox Width="100" Classes="Bordered" PlaceholderText="Bordered" />
<ComboBox Width="100" Classes="Bordered" IsEnabled="False" />
</StackPanel>
</StackPanel>
</UserControl>
</ScrollViewer>
</UserControl>

View File

@@ -1,6 +1,5 @@
using System.Collections.ObjectModel;
using Avalonia.Controls;
using CommunityToolkit.Mvvm.ComponentModel;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;
@@ -11,9 +10,4 @@ public partial class ComboBoxDemo : UserControl
InitializeComponent();
this.DataContext = new ComboBoxDemoViewModel();
}
}
public class ComboBoxDemoViewModel : ObservableObject
{
public ObservableCollection<string> Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"];
}

View File

@@ -7,59 +7,58 @@
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:DataGridDemoViewModel"
mc:Ignorable="d">
<TabControl>
<TabItem Header="DataGrid">
<Grid RowDefinitions="Auto, *">
<StackPanel Grid.Row="0" Orientation="Horizontal">
<ToggleSwitch Content="Enable" Name="enable" IsChecked="True" />
<ToggleSwitch Content="Inset Content" Name="inset" />
<ToggleSwitch Content="ScrollBar Auto Hide" Name="autohide" />
</StackPanel>
<DataGrid Grid.Row="1"
Margin="8"
CanUserReorderColumns="True"
CanUserResizeColumns="True"
CanUserSortColumns="True"
HeadersVisibility="All"
IsReadOnly="True"
Classes.InsetContent="{Binding #inset.IsChecked}"
ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
IsEnabled="{Binding #enable.IsChecked}"
ItemsSource="{Binding GridData1}">
<DataGrid.Columns>
<DataGridTextColumn
Width="6*"
x:DataType="vm:Song"
Binding="{Binding Title}"
Header="Title" />
<DataGridTextColumn
Width="6*"
x:DataType="vm:Song"
Binding="{Binding Artist}"
Header="Artist" />
<DataGridTextColumn
Width="6*"
x:DataType="vm:Song"
Binding="{Binding Album}"
Header="Album" />
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Margin="8,0,0,0"
VerticalAlignment="Center"
Text="{Binding Duration}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
<Grid RowDefinitions="Auto, *">
<StackPanel Grid.Row="0" Orientation="Horizontal">
<ToggleSwitch Content="Enable" Name="enable" IsChecked="True" />
<ToggleSwitch Content="Inset Content" Name="inset" />
<ToggleSwitch Content="ScrollBar Auto Hide" Name="autohide" />
</StackPanel>
<DataGrid Grid.Row="1"
Margin="8"
CanUserReorderColumns="True"
CanUserResizeColumns="True"
CanUserSortColumns="True"
HeadersVisibility="All"
IsReadOnly="True"
Classes.InsetContent="{Binding #inset.IsChecked}"
ScrollViewer.AllowAutoHide="{Binding #autohide.IsChecked}"
IsEnabled="{Binding #enable.IsChecked}"
ItemsSource="{Binding GridData1}">
<DataGrid.Columns>
<DataGridTextColumn
Width="6*"
x:DataType="vm:Song"
Binding="{Binding Title}"
Header="Title" />
<DataGridTextColumn
Width="6*"
x:DataType="vm:Song"
Binding="{Binding Artist}"
Header="Artist" />
<DataGridTextColumn
Width="6*"
x:DataType="vm:Song"
Binding="{Binding Album}"
Header="Album" />
<DataGridTemplateColumn Header="Duration" SortMemberPath="Duration">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock
Margin="8,0,0,0"
VerticalAlignment="Center"
Text="{Binding Duration}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</DataGrid>
</Grid>
</TabItem>
<TabItem Header="Grouping">
<DataGrid
@@ -177,4 +176,4 @@
</Grid>
</TabItem>
</TabControl>
</UserControl>
</UserControl>

View File

@@ -1,18 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using Avalonia;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Markup.Xaml;
using Avalonia.Threading;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -80,4 +80,4 @@
</TextBox>
</StackPanel>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class DataValidationErrorsDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -26,4 +26,4 @@
</StackPanel>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,7 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Media;
namespace Semi.Avalonia.Demo.Pages;
@@ -11,14 +8,4 @@ public partial class DatePickerDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
public override void Render(DrawingContext context)
{
base.Render(context);
}
}

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -1,7 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.LogicalTree;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -39,4 +39,4 @@
CornerRadius="10" />
</Grid>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,5 +1,4 @@
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -9,9 +8,4 @@ public partial class GridSplitterDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -8,7 +8,6 @@
xmlns:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="1450"
x:DataType="vm:HighContrastDemoViewModel"
x:CompileBindings="True"
x:Class="Semi.Avalonia.Demo.Pages.HighContrastDemo">
<Design.DataContext>
<vm:HighContrastDemoViewModel />

View File

@@ -1,7 +1,4 @@
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -18,78 +18,67 @@
Text="{Binding SearchText}"
Watermark="Input Icon Name" />
<TabControl Grid.Row="1">
<TabItem Header="Filled Icons">
<ScrollViewer>
<ItemsControl ItemsSource="{Binding FilteredFilledIcons}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Theme="{DynamicResource OutlineButton}"
Classes="Tertiary"
Padding="0"
Margin="10"
Width="200"
Height="120"
Click="Button_Clicked">
<StackPanel Spacing="8">
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
HorizontalAlignment="Center"
Classes="ExtraLarge"
Data="{Binding Geometry}" />
<TextBlock
HorizontalAlignment="Center"
FontSize="12"
FontWeight="Normal"
Text="{Binding ResourceKey}" />
</StackPanel>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</TabItem>
<TabControl
Grid.Row="1"
Theme="{StaticResource LineTabControl}"
ItemsSource="{Binding IconTabs}">
<TabControl.ItemTemplate>
<DataTemplate>
<WrapPanel ItemSpacing="5">
<TextBlock Text="{Binding Header}" />
<Label
Theme="{StaticResource TagLabel}"
Classes="Purple"
IsVisible="{Binding Header,
Converter={x:Static ObjectConverters.Equal},
ConverterParameter='AI Icons'}"
Content="New" />
</WrapPanel>
</DataTemplate>
</TabControl.ItemTemplate>
<TabItem Header="Stroked Icons">
<ScrollViewer>
<ItemsControl ItemsSource="{Binding FilteredStrokedIcons}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Theme="{DynamicResource OutlineButton}"
Classes="Tertiary"
Padding="0"
Margin="10"
Width="200"
Height="120"
Click="Button_Clicked">
<StackPanel Spacing="8">
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
HorizontalAlignment="Center"
Classes="ExtraLarge"
Data="{Binding Geometry}" />
<TextBlock
HorizontalAlignment="Center"
FontSize="12"
FontWeight="Normal"
Text="{Binding ResourceKey}" />
</StackPanel>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</TabItem>
<TabControl.ContentTemplate>
<DataTemplate DataType="vm:IconTab">
<ScrollViewer>
<ItemsControl
Margin="0 10"
ItemsSource="{Binding IconItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel
ItemWidth="200"
ItemHeight="120"
ItemSpacing="10"
LineSpacing="10" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Theme="{DynamicResource OutlineButton}"
Classes="Tertiary"
Padding="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Click="Button_Clicked">
<StackPanel Spacing="8">
<PathIcon
Theme="{DynamicResource InnerPathIcon}"
HorizontalAlignment="Center"
Classes="ExtraLarge"
Data="{Binding Geometry}" />
<TextBlock
HorizontalAlignment="Center"
FontSize="12"
FontWeight="Normal"
Text="{Binding ResourceKey}" />
</StackPanel>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
</Grid>
</UserControl>

View File

@@ -8,14 +8,11 @@
d:DesignWidth="800"
mc:Ignorable="d">
<ScrollViewer>
<StackPanel HorizontalAlignment="Left" Spacing="20">
<StackPanel>
<StackPanel.Styles>
<Style Selector="Label">
<Setter Property="Margin" Value="4" />
</Style>
<Style Selector="Grid > TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4" />
<Style Selector="Grid > TextBlock,Grid > Label">
<Setter Property="Layoutable.VerticalAlignment" Value="Center" />
<Setter Property="Layoutable.Margin" Value="4" />
</Style>
</StackPanel.Styles>
<ScrollViewer HorizontalScrollBarVisibility="Auto">
@@ -31,7 +28,7 @@
VerticalAlignment="Top"
ColumnDefinitions="Auto, *"
RowDefinitions="*,*,*,*,*,*,*,*,*,*,*">
<TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="0">Classes</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0">-</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0">Secondary</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0">Tertiary</TextBlock>
@@ -156,69 +153,89 @@
</HeaderedContentControl>
</StackPanel>
</ScrollViewer>
<WrapPanel>
<Label Theme="{StaticResource TagLabel}">Label</Label>
<Label Classes="Large" Theme="{StaticResource TagLabel}">Large Label</Label>
<Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle Label</Label>
<Label Classes="Large Circle" Theme="{StaticResource TagLabel}">Large Circle Label</Label>
</WrapPanel>
<WrapPanel>
<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>
</WrapPanel>
<WrapPanel>
<Label Classes="Ghost Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Ghost Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Ghost Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Ghost Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Ghost Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Ghost Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Ghost LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Ghost Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Ghost Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Ghost Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Ghost LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Ghost Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Ghost Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Ghost Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Ghost Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Ghost Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Ghost White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
<WrapPanel>
<Label Classes="Solid Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Solid Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Solid Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Solid Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Solid Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Solid Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Solid LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Solid Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Solid Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Solid Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Solid LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Solid Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Solid Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Solid Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Solid Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
</WrapPanel>
<HeaderedContentControl
Margin="16"
Header="Theme: TagLabel"
Theme="{DynamicResource GroupBox}">
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<StackPanel Orientation="Horizontal" Spacing="8">
<StackPanel Spacing="4">
<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>
</StackPanel>
<StackPanel Spacing="4">
<Label Classes="Ghost Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Ghost Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Ghost Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Ghost Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Ghost Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Ghost Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Ghost LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Ghost Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Ghost Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Ghost Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Ghost LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Ghost Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Ghost Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Ghost Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Ghost Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Ghost Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Ghost White" Theme="{StaticResource TagLabel}">White</Label>
</StackPanel>
<StackPanel Spacing="4">
<Label Classes="Solid Red" Theme="{StaticResource TagLabel}">Red</Label>
<Label Classes="Solid Pink" Theme="{StaticResource TagLabel}">Pink</Label>
<Label Classes="Solid Purple" Theme="{StaticResource TagLabel}">Purple</Label>
<Label Classes="Solid Violet" Theme="{StaticResource TagLabel}">Violet</Label>
<Label Classes="Solid Indigo" Theme="{StaticResource TagLabel}">Indigo</Label>
<Label Classes="Solid Blue" Theme="{StaticResource TagLabel}">Blue</Label>
<Label Classes="Solid LightBlue" Theme="{StaticResource TagLabel}">LightBlue</Label>
<Label Classes="Solid Cyan" Theme="{StaticResource TagLabel}">Cyan</Label>
<Label Classes="Solid Teal" Theme="{StaticResource TagLabel}">Teal</Label>
<Label Classes="Solid Green" Theme="{StaticResource TagLabel}">Green</Label>
<Label Classes="Solid LightGreen" Theme="{StaticResource TagLabel}">LightGreen</Label>
<Label Classes="Solid Lime" Theme="{StaticResource TagLabel}">Lime</Label>
<Label Classes="Solid Yellow" Theme="{StaticResource TagLabel}">Yellow</Label>
<Label Classes="Solid Amber" Theme="{StaticResource TagLabel}">Amber</Label>
<Label Classes="Solid Orange" Theme="{StaticResource TagLabel}">Orange</Label>
<Label Classes="Solid Grey" Theme="{StaticResource TagLabel}">Grey</Label>
<Label Classes="Solid White" Theme="{StaticResource TagLabel}">White</Label>
</StackPanel>
<StackPanel Spacing="4">
<Label Classes="Colorful Gradient" Theme="{DynamicResource TagLabel}">Light</Label>
<Label Classes="Colorful Gradient Ghost" Theme="{DynamicResource TagLabel}">Ghost</Label>
<Label Classes="Colorful Gradient Solid" Theme="{DynamicResource TagLabel}">Solid</Label>
</StackPanel>
<StackPanel Spacing="4">
<Label Classes="Colorful" Theme="{DynamicResource TagLabel}">Light</Label>
<Label Classes="Colorful Ghost" Theme="{DynamicResource TagLabel}">Ghost</Label>
<Label Classes="Colorful Solid" Theme="{DynamicResource TagLabel}">Solid</Label>
</StackPanel>
<StackPanel Spacing="4">
<Label Theme="{StaticResource TagLabel}">Label</Label>
<Label Classes="Large" Theme="{StaticResource TagLabel}">Large Label</Label>
<Label Classes="Circle" Theme="{StaticResource TagLabel}">Circle Label</Label>
<Label Classes="Large Circle" Theme="{StaticResource TagLabel}">Large Circle Label</Label>
</StackPanel>
</StackPanel>
</ScrollViewer>
</HeaderedContentControl>
</StackPanel>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -16,7 +16,7 @@
Header="Default">
<ScrollViewer>
<StackPanel Spacing="20">
<TextBlock Text="Theme: Default"/>
<TextBlock Text="Theme: Default" />
<ListBox ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
<ListBox IsEnabled="False">
<ListBoxItem IsSelected="True">Avalonia</ListBoxItem>
@@ -31,7 +31,7 @@
Theme="{DynamicResource GroupBox}"
Header="RadioGroupListBox">
<StackPanel Spacing="20">
<TextBlock Text="Theme: RadioGroupListBox"/>
<TextBlock Text="Theme: RadioGroupListBox" />
<ListBox
Theme="{DynamicResource RadioGroupListBox}"
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
@@ -40,7 +40,7 @@
<ListBoxItem IsSelected="True">WPF</ListBoxItem>
</ListBox>
<TextBlock Text="Theme: ButtonRadioGroupListBox"/>
<TextBlock Text="Theme: ButtonRadioGroupListBox" />
<StackPanel Orientation="Horizontal">
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
<ListBox Theme="{DynamicResource ButtonRadioGroupListBox}">
@@ -93,7 +93,7 @@
</Border>
</StackPanel>
<TextBlock Text="Theme: CardRadioGroupListBox"/>
<TextBlock Text="Theme: CardRadioGroupListBox" />
<ListBox Theme="{DynamicResource CardRadioGroupListBox}"
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
<ListBox Theme="{DynamicResource CardRadioGroupListBox}" IsEnabled="False">
@@ -101,7 +101,7 @@
<ListBoxItem>WPF</ListBoxItem>
</ListBox>
<TextBlock Text="Theme: PureCardRadioGroupListBox"/>
<TextBlock Text="Theme: PureCardRadioGroupListBox" />
<ListBox Theme="{DynamicResource PureCardRadioGroupListBox}"
ItemsSource="{Binding $parent[local:ListBoxDemo].Items}" />
<ListBox Theme="{DynamicResource PureCardRadioGroupListBox}" IsEnabled="False">
@@ -117,7 +117,7 @@
Header="CheckGroupListBox">
<ScrollViewer>
<StackPanel Spacing="20">
<TextBlock Text="Theme: CheckGroupListBox"/>
<TextBlock Text="Theme: CheckGroupListBox" />
<ListBox
SelectionMode="Multiple,Toggle"
Theme="{DynamicResource CheckGroupListBox}"
@@ -129,7 +129,7 @@
<ListBoxItem>WPF</ListBoxItem>
</ListBox>
<TextBlock Text="Theme: CardCheckGroupListBox"/>
<TextBlock Text="Theme: CardCheckGroupListBox" />
<ListBox
SelectionMode="Multiple,Toggle"
Theme="{DynamicResource CardCheckGroupListBox}"

View File

@@ -17,4 +17,4 @@
<Button Name="SelectFolderButton" Content="Select Folder" />
<Button Name="SaveFileButton" Content="Save File" />
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -145,4 +145,4 @@
<TextBlock Text="Right Click to show Context Flyout" />
</Border>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -11,8 +9,4 @@ public partial class MenuDemo : UserControl
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -27,7 +27,8 @@ public partial class NotificationDemo : UserControl
if (sender is RadioButton b && b.Content is string s)
{
Enum.TryParse<NotificationPosition>(s, out var t);
_manager.Position = t;
if (_manager is not null)
_manager.Position = t;
}
}

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -11,8 +9,4 @@ public partial class NumericUpDownDemo : UserControl
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -348,7 +348,7 @@
Classes="H5"
Text="Start to install"
Theme="{DynamicResource TitleTextBlock}" />
<TabControl Padding="8">
<TabControl Theme="{StaticResource LineTabControl}">
<TabItem Header="Main">
<StackPanel>
<TextBlock Text="Install via nuget: " />
@@ -409,6 +409,51 @@
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Dock">
<StackPanel>
<TextBlock Text="Install via nuget: " />
<Border Margin="0,16" Classes="CodeBlock">
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].DockInstall}" />
</Border>
<TextBlock Text="Reference styles: " />
<Border Margin="0,16" Classes="CodeBlock">
<SelectableTextBlock
FontFamily="Consolas"
Text="{Binding $parent[local:Overview].DockStyle}"
TextWrapping="Wrap" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Tabalonia">
<StackPanel>
<TextBlock Text="Install via nuget: " />
<Border Margin="0,16" Classes="CodeBlock">
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].TabaloniaInstall}" />
</Border>
<TextBlock Text="Reference styles: " />
<Border Margin="0,16" Classes="CodeBlock">
<SelectableTextBlock
FontFamily="Consolas"
Text="{Binding $parent[local:Overview].TabaloniaStyle}"
TextWrapping="Wrap" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="AvaloniaEdit">
<StackPanel>
<TextBlock Text="Install via nuget: " />
<Border Margin="0,16" Classes="CodeBlock">
<SelectableTextBlock FontFamily="Consolas" Text="{Binding $parent[local:Overview].AvaloniaEditInstall}" />
</Border>
<TextBlock Text="Reference styles: " />
<Border Margin="0,16" Classes="CodeBlock">
<SelectableTextBlock
FontFamily="Consolas"
Text="{Binding $parent[local:Overview].AvaloniaEditStyle}"
TextWrapping="Wrap" />
</Border>
</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</StackPanel>

View File

@@ -9,41 +9,66 @@ public partial class Overview : UserControl
InitializeComponent();
}
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia --version 11.2.1.6";
public string MainInstall { get; set; } = "dotnet add package Semi.Avalonia";
public string MainStyle { get; set; } =
"""
<Application.Styles>
<!-- You can still reference in old way. -->
<!-- <StyleInclude Source="avares://Semi.Avalonia/Index.axaml" /> -->
<semi:SemiTheme Locale="zh-CN" />
</Application.Styles>
""";
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker --version 11.2.1.6";
public string ColorPickerInstall { get; set; } = "dotnet add package Semi.Avalonia.ColorPicker";
public string ColorPickerStyle { get; set; } =
"""
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia.ColorPicker/Index.axaml" />
<semi:ColorPickerSemiTheme />
</Application.Styles>
""";
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid --version 11.2.1.6";
public string DataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.DataGrid";
public string DataGridStyle { get; set; } =
"""
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia.DataGrid/Index.axaml" />
<semi:DataGridSemiTheme />
</Application.Styles>
""";
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid --version 11.0.10.2";
public string TreeDataGridInstall { get; set; } = "dotnet add package Semi.Avalonia.TreeDataGrid";
public string TreeDataGridStyle { get; set; } =
"""
<Application.Styles>
<StyleInclude Source="avares://Semi.Avalonia.TreeDataGrid/Index.axaml" />
<semi:TreeDataGridSemiTheme />
</Application.Styles>
""";
public string DockInstall { get; set; } = "dotnet add package Semi.Avalonia.Dock";
public string DockStyle { get; set; } =
"""
<Application.Styles>
<semi:DockSemiTheme />
</Application.Styles>
""";
public string TabaloniaInstall { get; set; } = "dotnet add package Semi.Avalonia.Tabalonia";
public string TabaloniaStyle { get; set; } =
"""
<Application.Styles>
<semi:TabaloniaSemiTheme />
</Application.Styles>
""";
public string AvaloniaEditInstall { get; set; } = "dotnet add package Semi.Avalonia.AvaloniaEdit";
public string AvaloniaEditStyle { get; set; } =
"""
<Application.Styles>
<semi:AvaloniaEditSemiTheme />
</Application.Styles>
""";
}

View File

@@ -8,7 +8,6 @@
xmlns:viewModels="clr-namespace:Semi.Avalonia.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="viewModels:PaletteDemoViewModel"
mc:Ignorable="d">
<Design.DataContext>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.Controls;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -20,15 +20,16 @@
Minimum="{Binding #slider.Minimum}"
Theme="{DynamicResource ProgressRing}"
Value="{Binding #slider.Value}"
ShowProgressText="True"/>
ShowProgressText="True" />
<ProgressBar
Width="100"
Height="100"
IsIndeterminate="True"
BorderThickness="16"
Maximum="{Binding #slider.Maximum}"
Minimum="{Binding #slider.Minimum}"
Theme="{DynamicResource ProgressRing}"
ShowProgressText="True"/>
ShowProgressText="True" />
</StackPanel>
<Slider
Name="slider"

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class ProgressBarDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -4,11 +4,10 @@
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:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
x:DataType="pages:RefreshContainerDemoViewModel"
x:CompileBindings="True"
x:DataType="vm:RefreshContainerDemoViewModel"
mc:Ignorable="d">
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
<Label DockPanel.Dock="Top">A control that supports pull to refresh</Label>
@@ -24,4 +23,4 @@
ItemsSource="{Binding Items}" />
</RefreshContainer>
</DockPanel>
</UserControl>
</UserControl>

View File

@@ -1,8 +1,5 @@
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using Avalonia.Controls;
using CommunityToolkit.Mvvm.ComponentModel;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;
@@ -13,34 +10,14 @@ public partial class RefreshContainerDemo : UserControl
public RefreshContainerDemo()
{
InitializeComponent();
_viewModel = new RefreshContainerDemoViewModel();
DataContext = _viewModel;
}
private async void RefreshContainerPage_RefreshRequested(object? sender, RefreshRequestedEventArgs e)
{
var deferral = e.GetDeferral();
await _viewModel.AddToTop();
deferral.Complete();
}
}
public class RefreshContainerDemoViewModel : ObservableObject
{
public ObservableCollection<string> Items { get; }
public RefreshContainerDemoViewModel()
{
Items = new ObservableCollection<string>(Enumerable.Range(1, 200).Select(i => $"Item {i}"));
}
public async Task AddToTop()
{
await Task.Delay(1000);
Items.Insert(0, $"Item {200 - Items.Count}");
}
}

View File

@@ -1,80 +0,0 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Pages.RepeatButtonDemo"
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"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left" Spacing="20">
<TextBlock>Light (Default)</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Primary">Primary</RepeatButton>
<RepeatButton Classes="Secondary">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary">Tertiary</RepeatButton>
<RepeatButton Classes="Success">Success</RepeatButton>
<RepeatButton Classes="Warning">Warning</RepeatButton>
<RepeatButton Classes="Danger">Danger</RepeatButton>
<RepeatButton Classes="Danger" IsEnabled="False">Disabled</RepeatButton>
</StackPanel>
<TextBlock>Solid</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Primary" Theme="{DynamicResource SolidRepeatButton}">Primary</RepeatButton>
<RepeatButton Classes="Secondary" Theme="{DynamicResource SolidRepeatButton}">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary" Theme="{DynamicResource SolidRepeatButton}">Tertiary</RepeatButton>
<RepeatButton Classes="Success" Theme="{DynamicResource SolidRepeatButton}">Success</RepeatButton>
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
<RepeatButton
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource SolidRepeatButton}">
Disabled
</RepeatButton>
</StackPanel>
<TextBlock>Outline</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Primary" Theme="{DynamicResource OutlineRepeatButton}">Primary</RepeatButton>
<RepeatButton Classes="Secondary" Theme="{DynamicResource OutlineRepeatButton}">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary" Theme="{DynamicResource OutlineRepeatButton}">Tertiary</RepeatButton>
<RepeatButton Classes="Success" Theme="{DynamicResource OutlineRepeatButton}">Success</RepeatButton>
<RepeatButton Classes="Warning" Theme="{DynamicResource OutlineRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource OutlineRepeatButton}">Danger</RepeatButton>
<RepeatButton
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource OutlineRepeatButton}">
Disabled
</RepeatButton>
</StackPanel>
<TextBlock>Borderless</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
<RepeatButton Classes="Secondary" Theme="{DynamicResource BorderlessRepeatButton}">Secondary</RepeatButton>
<RepeatButton Classes="Tertiary" Theme="{DynamicResource BorderlessRepeatButton}">Tertiary</RepeatButton>
<RepeatButton Classes="Success" Theme="{DynamicResource BorderlessRepeatButton}">Success</RepeatButton>
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
<RepeatButton
Classes="Danger"
IsEnabled="False"
Theme="{DynamicResource BorderlessRepeatButton}">
Disabled
</RepeatButton>
</StackPanel>
<TextBlock>Disabled</TextBlock>
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
<Button IsEnabled="False">Light</Button>
<Button IsEnabled="False" Theme="{DynamicResource SolidButton}">Solid</Button>
<Button IsEnabled="False" Theme="{DynamicResource OutlineButton}">Outline</Button>
<Button IsEnabled="False" Theme="{DynamicResource BorderlessButton}">Borderless</Button>
</StackPanel>
<TextBlock>Size Classes</TextBlock>
<StackPanel Orientation="Horizontal" Spacing="20">
<RepeatButton Classes="Small">Small</RepeatButton>
<RepeatButton>Default</RepeatButton>
<RepeatButton Classes="Large">Large</RepeatButton>
</StackPanel>
</StackPanel>
</UserControl>

View File

@@ -1,13 +0,0 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
public partial class RepeatButtonDemo : UserControl
{
public RepeatButtonDemo()
{
InitializeComponent();
}
}

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class ScrollViewerDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -165,4 +165,4 @@
</HeaderedContentControl>
</StackPanel>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -11,8 +9,4 @@ public partial class SelectableTextBlockDemo : UserControl
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -98,4 +98,4 @@
Value="30" />
</StackPanel>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -11,8 +9,4 @@ public partial class SliderDemo : UserControl
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -4,179 +4,190 @@
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:pages="clr-namespace:Semi.Avalonia.Demo.Pages"
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
d:DesignHeight="1000"
d:DesignWidth="800"
x:DataType="vm:SplitViewDemoViewModel"
mc:Ignorable="d">
<Design.DataContext>
<pages:SplitViewDemoViewModel />
<vm:SplitViewDemoViewModel />
</Design.DataContext>
<Border>
<Grid ColumnDefinitions="*,400">
<Border Grid.Column="1" VerticalAlignment="Top" Margin="10 0 0 0">
<Grid RowDefinitions="*, *, *, *, *, *" ColumnDefinitions="Auto, *">
<Border
Grid.Column="1"
Margin="10,0,0,0"
VerticalAlignment="Top">
<Grid ColumnDefinitions="Auto, *" RowDefinitions="*, *, *, *, *, *">
<Label
Grid.Row="0" Grid.Column="0"
Grid.Row="0"
Grid.Column="0"
VerticalAlignment="Center"
Content="IsPaneOpen" />
<ToggleSwitch
Grid.Row="0" Grid.Column="1"
Name="PaneOpenButton"
IsChecked="{Binding #SplitView.IsPaneOpen}" />
Grid.Row="0"
Grid.Column="1" />
<Label
Grid.Row="1" Grid.Column="0"
Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Center"
Content="UseLightDismissOverlayMode" />
<ToggleSwitch
Grid.Row="1" Grid.Column="1"
Name="UseLightDismissOverlayModeButton"
IsChecked="{Binding #SplitView.UseLightDismissOverlayMode}" />
Grid.Row="1"
Grid.Column="1" />
<Label
Grid.Row="2" Grid.Column="0"
Grid.Row="2"
Grid.Column="0"
VerticalAlignment="Center"
Content="Placement" />
<ToggleSwitch
Grid.Row="2" Grid.Column="1"
OffContent="Left"
OnContent="Right"
IsChecked="{Binding #SplitView.PanePlacement}" />
<ComboBox
Grid.Row="2"
Grid.Column="1"
Name="PanelPlacementSelector"
HorizontalAlignment="Stretch"
ItemsSource="{x:Static vm:SplitViewDemoViewModel.Placements}"
SelectedItem="{x:Static SplitViewPanePlacement.Left}"
/>
<Label
Grid.Row="3" Grid.Column="0"
Grid.Row="3"
Grid.Column="0"
VerticalAlignment="Center"
Content="DisplayMode" />
<ComboBox
Grid.Row="3" Grid.Column="1"
Name="DisplayModeSelector"
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Stretch"
ItemsSource="{Binding DisplayModes}"
SelectedIndex="{Binding #SplitView.DisplayMode}" />
ItemsSource="{x:Static vm:SplitViewDemoViewModel.DisplayModes}"
SelectedItem="{x:Static SplitViewDisplayMode.CompactInline}" />
<Label
Grid.Row="4" Grid.Column="0"
Grid.Row="4"
Grid.Column="0"
VerticalAlignment="Center"
Content="{Binding #CompactPaneLengthSlider.Value, StringFormat='{}CompactPaneLength: {0}'}" />
<Slider
Grid.Row="4" Grid.Column="1"
Name="CompactPaneLengthSlider"
Grid.Row="4"
Grid.Column="1"
IsSnapToTickEnabled="True"
Maximum="128"
Minimum="0"
TickFrequency="1"
IsSnapToTickEnabled="True"
Value="{Binding #SplitView.CompactPaneLength}" />
Value="48" />
<Label
Grid.Row="5" Grid.Column="0"
Grid.Row="5"
Grid.Column="0"
VerticalAlignment="Center"
Content="{Binding #OpenPaneLengthSlider.Value,StringFormat='{}OpenPaneLength: {0}'}" />
Content="{Binding #OpenPaneLengthSlider.Value, StringFormat='{}OpenPaneLength: {0}'}" />
<Slider
Grid.Row="5" Grid.Column="1"
Name="OpenPaneLengthSlider"
Grid.Row="5"
Grid.Column="1"
IsSnapToTickEnabled="True"
Maximum="500"
Minimum="128"
TickFrequency="1"
IsSnapToTickEnabled="True"
Value="{Binding #SplitView.OpenPaneLength}" />
Value="256" />
</Grid>
</Border>
<Border
<SplitView
Grid.Column="0"
BorderBrush="{DynamicResource SemiGrey1}"
BorderThickness="1">
<SplitView
Name="SplitView"
DisplayMode="CompactOverlay"
CompactPaneLength="48"
OpenPaneLength="256">
<SplitView.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
<GradientStop Color="#6b4c1b" Offset="0" />
<GradientStop Color="#291e10" Offset="1" />
</LinearGradientBrush>
</SplitView.Background>
<SplitView.Pane>
<Grid RowDefinitions="Auto,*,Auto">
Name="SplitView"
CompactPaneLength="{Binding #CompactPaneLengthSlider.Value}"
DisplayMode="{Binding #DisplayModeSelector.SelectedItem}"
IsPaneOpen="{Binding #PaneOpenButton.IsChecked, Mode=TwoWay}"
OpenPaneLength="{Binding #OpenPaneLengthSlider.Value}"
PanePlacement="{Binding #PanelPlacementSelector.SelectedItem}"
UseLightDismissOverlayMode="{Binding #UseLightDismissOverlayModeButton.IsChecked}">
<SplitView.Background>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
<GradientStop Offset="0" Color="#6b4c1b" />
<GradientStop Offset="1" Color="#291e10" />
</LinearGradientBrush>
</SplitView.Background>
<SplitView.Pane>
<Grid RowDefinitions="Auto,*,Auto">
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="8 12">
<ToggleSwitch
Content="{StaticResource SemiIconSidebar}"
IsChecked="{Binding #SplitView.IsPaneOpen}"
Theme="{DynamicResource IconBorderlessToggleSwitch}" />
<TextBlock
Grid.Row="0"
Name="PaneHeader"
Margin="8,12"
VerticalAlignment="Center"
Margin="8 0"
FontWeight="Bold"
Text="Playlist" />
<ListBox
Grid.Row="1"
ItemsSource="{Binding Songs}" />
<ToggleSwitch
Grid.Row="2"
Theme="{DynamicResource IconBorderlessToggleSwitch}"
Content="{StaticResource SemiIconSidebar}"
HorizontalAlignment="Left"
IsChecked="{Binding #SplitView.IsPaneOpen}">
</ToggleSwitch>
</Grid>
</SplitView.Pane>
<Panel>
<Panel.Styles>
<Style Selector="Image#AlbumCover">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:40">
<KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0" />
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Panel.Styles>
<Image
Source="/Assets/WORLD.png"
Name="AlbumCover"
Width="200"
Height="200" />
<Arc
Width="290"
Height="290"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="45">
<Arc.Stroke>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Color="#010101" Offset="0" />
<GradientStop Color="#363636" Offset="0.5" />
<GradientStop Color="#010101" Offset="1" />
</LinearGradientBrush>
</Arc.Stroke>
</Arc>
<Arc
Width="294"
Height="294"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="4"
Stroke="Black" />
<Arc
Width="310"
Height="310"
StartAngle="0"
SweepAngle="360"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="10"
Stroke="#C6CACD"
Opacity="0.1" />
</Panel>
</SplitView>
</Border>
</StackPanel>
<ListBox Grid.Row="1" ItemsSource="{Binding Songs}" />
</Grid>
</SplitView.Pane>
<Panel>
<Panel.Styles>
<Style Selector="Image#AlbumCover">
<Style.Animations>
<Animation IterationCount="Infinite" Duration="0:0:40">
<KeyFrame Cue="0%">
<Setter Property="RotateTransform.Angle" Value="0" />
</KeyFrame>
<KeyFrame Cue="100%">
<Setter Property="RotateTransform.Angle" Value="360" />
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Panel.Styles>
<Image
Name="AlbumCover"
Width="200"
Height="200"
Source="/Assets/WORLD.png" />
<Arc
Width="290"
Height="290"
StartAngle="0"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="45"
SweepAngle="360">
<Arc.Stroke>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Offset="0" Color="#010101" />
<GradientStop Offset="0.5" Color="#363636" />
<GradientStop Offset="1" Color="#010101" />
</LinearGradientBrush>
</Arc.Stroke>
</Arc>
<Arc
Width="294"
Height="294"
StartAngle="0"
Stroke="Black"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="4"
SweepAngle="360" />
<Arc
Width="310"
Height="310"
Opacity="0.1"
StartAngle="0"
Stroke="#C6CACD"
StrokeJoin="Round"
StrokeLineCap="Round"
StrokeThickness="10"
SweepAngle="360" />
</Panel>
</SplitView>
</Grid>
</Border>
</UserControl>

View File

@@ -1,7 +1,5 @@
using System.Collections.ObjectModel;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using CommunityToolkit.Mvvm.ComponentModel;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;
@@ -12,33 +10,4 @@ public partial class SplitViewDemo : UserControl
InitializeComponent();
this.DataContext = new SplitViewDemoViewModel();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
public class SplitViewDemoViewModel : ObservableObject
{
public ObservableCollection<string> Songs { get; set; } =
[
"320万年前",
"隐德来希",
"孔明",
"锦鲤卟噜噜",
"指鹿为马",
"热带季风Remix",
"加州梦境",
"渐近自由",
"世界所有的烂漫",
];
public ObservableCollection<SplitViewDisplayMode> DisplayModes { get; set; } =
[
SplitViewDisplayMode.Inline,
SplitViewDisplayMode.CompactInline,
SplitViewDisplayMode.Overlay,
SplitViewDisplayMode.CompactOverlay,
];
}

View File

@@ -7,89 +7,125 @@
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels;assembly=Semi.Avalonia.Demo"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:TabControlDemoViewModel"
mc:Ignorable="d">
<ScrollViewer>
<StackPanel Spacing="20">
<Border Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="Top">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="Left">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="Right">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="Bottom">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabStrip>
<TabStripItem>Tab 1</TabStripItem>
<TabStripItem>Tab 2</TabStripItem>
</TabStrip>
</Border>
<Border Height="300" Theme="{DynamicResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="Top"
Theme="{DynamicResource ScrollTabControl}" />
</Border>
<Border Height="300" Theme="{DynamicResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="Left"
Theme="{DynamicResource ScrollTabControl}" />
</Border>
<Border Height="300" Theme="{DynamicResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="Bottom"
Theme="{DynamicResource ScrollTabControl}" />
</Border>
<Border Height="300" Theme="{DynamicResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="Right"
Theme="{DynamicResource ScrollTabControl}" />
<StackPanel>
<Border
Margin="8"
HorizontalAlignment="Left"
Theme="{StaticResource RadioButtonGroupBorder}">
<ListBox Name="place" Theme="{StaticResource ButtonRadioGroupListBox}">
<Dock>Left</Dock>
<Dock>Bottom</Dock>
<Dock>Right</Dock>
<Dock>Top</Dock>
</ListBox>
</Border>
<TabControl Theme="{StaticResource LineTabControl}">
<TabItem Header="Default">
<StackPanel>
<StackPanel
Margin="8"
Orientation="Horizontal"
Spacing="8">
<TextBlock VerticalAlignment="Center" Text="ReverseSeparator" />
<ToggleSwitch Name="reverse" Theme="{StaticResource SimpleToggleSwitch}" />
</StackPanel>
<Border MinHeight="150" Theme="{StaticResource CardBorder}">
<TabControl Classes.ReverseSeparator="{Binding #reverse.IsChecked}" TabStripPlacement="{Binding #place.SelectedValue}">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Height="300" Theme="{StaticResource CardBorder}">
<TabControl
Classes.ReverseSeparator="{Binding #reverse.IsChecked}"
ItemsSource="{Binding Items}"
TabStripPlacement="{Binding #place.SelectedValue}"
Theme="{StaticResource ScrollTabControl}" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Line">
<StackPanel>
<Border MinHeight="150" Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="{Binding #place.SelectedValue}" Theme="{StaticResource LineTabControl}">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Height="300" Theme="{StaticResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="{Binding #place.SelectedValue}"
Theme="{StaticResource ScrollLineTabControl}" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Card">
<StackPanel>
<Border
MinHeight="150"
Background="Transparent"
Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="{Binding #place.SelectedValue}" Theme="{StaticResource CardTabControl}">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border
Height="300"
Background="Transparent"
Theme="{StaticResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="{Binding #place.SelectedValue}"
Theme="{StaticResource ScrollCardTabControl}" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Button">
<StackPanel>
<Border MinHeight="150" Theme="{StaticResource CardBorder}">
<TabControl TabStripPlacement="{Binding #place.SelectedValue}" Theme="{StaticResource ButtonTabControl}">
<TabItem Content="Hello 1" Header="Tab 1" />
<TabItem Content="Hello 2" Header="Tab 2" />
<TabItem Content="Hello 3" Header="Tab 3" />
<TabItem Content="中文内容" Header="中文中文" />
<TabItem
Content="Hello 4"
Header="Tab 4"
IsEnabled="False" />
</TabControl>
</Border>
<Border Height="300" Theme="{StaticResource CardBorder}">
<TabControl
ItemsSource="{Binding Items}"
TabStripPlacement="{Binding #place.SelectedValue}"
Theme="{StaticResource ScrollButtonTabControl}" />
</Border>
</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -0,0 +1,93 @@
<UserControl 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:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Semi.Avalonia.Demo.Pages.TabStripDemo"
x:DataType="vm:TabStripDemoViewModel">
<Design.DataContext>
<vm:TabStripDemoViewModel />
</Design.DataContext>
<ScrollViewer>
<StackPanel>
<TabControl Theme="{StaticResource LineTabControl}">
<TabItem Header="Default">
<StackPanel>
<Border Theme="{StaticResource CardBorder}">
<TabStrip>
<TabStripItem Content="Tab 1" />
<TabStripItem Content="Tab 2" />
<TabStripItem Content="Tab 3" />
<TabStripItem Content="中文中文" />
<TabStripItem Content="Tab 4" IsEnabled="False" />
</TabStrip>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabStrip
ItemsSource="{Binding Items}" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Line">
<StackPanel>
<Border Theme="{StaticResource CardBorder}">
<TabStrip Theme="{StaticResource LineTabStrip}">
<TabStripItem Content="Tab 1" />
<TabStripItem Content="Tab 2" />
<TabStripItem Content="Tab 3" />
<TabStripItem Content="中文中文" />
<TabStripItem Content="Tab 4" IsEnabled="False" />
</TabStrip>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabStrip
ItemsSource="{Binding Items}"
Theme="{StaticResource LineTabStrip}" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Card">
<StackPanel>
<Border
Background="Transparent"
Theme="{StaticResource CardBorder}">
<TabStrip Theme="{StaticResource CardTabStrip}">
<TabStripItem Content="Tab 1" />
<TabStripItem Content="Tab 2" />
<TabStripItem Content="Tab 3" />
<TabStripItem Content="中文中文" />
<TabStripItem Content="Tab 4" IsEnabled="False" />
</TabStrip>
</Border>
<Border
Background="Transparent"
Theme="{StaticResource CardBorder}">
<TabStrip
ItemsSource="{Binding Items}"
Theme="{StaticResource CardTabStrip}" />
</Border>
</StackPanel>
</TabItem>
<TabItem Header="Button">
<StackPanel>
<Border Theme="{StaticResource CardBorder}">
<TabStrip Theme="{StaticResource ButtonTabStrip}">
<TabStripItem Content="Tab 1" />
<TabStripItem Content="Tab 2" />
<TabStripItem Content="Tab 3" />
<TabStripItem Content="中文中文" />
<TabStripItem Content="Tab 4" IsEnabled="False" />
</TabStrip>
</Border>
<Border Theme="{StaticResource CardBorder}">
<TabStrip
ItemsSource="{Binding Items}"
Theme="{StaticResource ButtonTabStrip}" />
</Border>
</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</ScrollViewer>
</UserControl>

View File

@@ -0,0 +1,13 @@
using Avalonia.Controls;
using Semi.Avalonia.Demo.ViewModels;
namespace Semi.Avalonia.Demo.Pages;
public partial class TabStripDemo : UserControl
{
public TabStripDemo()
{
InitializeComponent();
this.DataContext = new TabStripDemoViewModel();
}
}

View File

@@ -159,4 +159,4 @@
</HeaderedContentControl>
</StackPanel>
</ScrollViewer>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -48,6 +48,7 @@
IsEnabled="False" />
</StackPanel>
<TextBox Width="300" Classes="TextArea" Watermark="TextArea TextBox" />
<TextBox Width="300" Classes="TextArea ClearButton" Text="TextArea with ClearButton - text should be clearable" />
<TextBox
Width="300"
Theme="{StaticResource LooklessTextBox}"

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;

View File

@@ -17,9 +17,9 @@
<TimePicker Classes="Large" />
<TimePicker Classes="Small" />
<StackPanel Orientation="Horizontal">
<TimePicker Classes="Large" ClockIdentifier="12HourClock"/>
<TimePicker ClockIdentifier="12HourClock"/>
<TimePicker Classes="Small" ClockIdentifier="12HourClock"/>
<TimePicker Classes="Large" ClockIdentifier="12HourClock" />
<TimePicker ClockIdentifier="12HourClock" />
<TimePicker Classes="Small" ClockIdentifier="12HourClock" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TimePicker IsEnabled="False" />
@@ -28,4 +28,4 @@
</StackPanel>
</StackPanel>
</UserControl>
</UserControl>

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class TimePickerDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -1,98 +0,0 @@
<UserControl
x:Class="Semi.Avalonia.Demo.Pages.ToggleButtonDemo"
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"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<StackPanel Spacing="20">
<TextBlock Text="Toggle Button (Default)" />
<StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton>Default</ToggleButton>
<ToggleButton Classes="Primary">Primary</ToggleButton>
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
<ToggleButton Classes="Success">Success</ToggleButton>
<ToggleButton Classes="Warning">Warning</ToggleButton>
<ToggleButton Classes="Danger">Danger</ToggleButton>
<ToggleButton Classes="Danger" IsEnabled="False">Disabled</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Checked State" />
<StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton IsChecked="True">Default</ToggleButton>
<ToggleButton Classes="Primary" IsChecked="True">Primary</ToggleButton>
<ToggleButton Classes="Secondary" IsChecked="True">Secondary</ToggleButton>
<ToggleButton Classes="Tertiary" IsChecked="True">Tertiary</ToggleButton>
<ToggleButton Classes="Success" IsChecked="True">Success</ToggleButton>
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
<ToggleButton
Classes="Danger"
IsChecked="True"
IsEnabled="False">
Disabled
</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Three State" />
<StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton IsChecked="{x:Null}" IsThreeState="True">Default</ToggleButton>
<ToggleButton
Classes="Primary"
IsChecked="{x:Null}"
IsThreeState="True">
Primary
</ToggleButton>
<ToggleButton
Classes="Secondary"
IsChecked="{x:Null}"
IsThreeState="True">
Secondary
</ToggleButton>
<ToggleButton
Classes="Tertiary"
IsChecked="{x:Null}"
IsThreeState="True">
Tertiary
</ToggleButton>
<ToggleButton
Classes="Success"
IsChecked="{x:Null}"
IsThreeState="True">
Success
</ToggleButton>
<ToggleButton
Classes="Warning"
IsChecked="{x:Null}"
IsThreeState="True">
Warning
</ToggleButton>
<ToggleButton
Classes="Danger"
IsChecked="{x:Null}"
IsThreeState="True">
Danger
</ToggleButton>
<ToggleButton
Classes="Danger"
IsChecked="{x:Null}"
IsEnabled="False"
IsThreeState="True">
Disabled
</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Disabled State" />
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
<ToggleButton IsThreeState="True" IsEnabled="False">Default</ToggleButton>
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="True">Checked</ToggleButton>
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="{x:Null}">Indeterminate</ToggleButton>
</StackPanel>
<TextBlock Text="Toggle Button Size" />
<StackPanel Orientation="Horizontal" Spacing="20">
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
<ToggleButton IsThreeState="True">Default</ToggleButton>
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
</StackPanel>
</StackPanel>
</UserControl>

View File

@@ -1,18 +0,0 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
public partial class ToggleButtonDemo : UserControl
{
public ToggleButtonDemo()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class ToggleSwitchDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace Semi.Avalonia.Demo.Pages;
@@ -10,9 +8,4 @@ public partial class ToolTipDemo : UserControl
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

Some files were not shown because too many files have changed in this diff Show More