Commit Graph

830 Commits

Author SHA1 Message Date
c0a9852f9e feat: add LargeMessageBoxControl and improve MessageBox functionality 2026-01-22 16:48:21 +08:00
Dong Bin
975757dbb8 fix: update TimePicker to correctly handle second selector panel type. (#856) 2026-01-19 14:10:46 +08:00
Yuki Kurano
f740484f4c Fix PathPicker SelectedPathsText 2026-01-06 23:32:49 +08:00
Copilot
e54474b0f9 Implement ItemSpacing and LineSpacing in ElasticWrapPanel (#843)
* Initial plan

* Implement ItemSpacing and LineSpacing support for ElasticWrapPanel

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

* Add demo tab showcasing ItemSpacing and LineSpacing

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

* Add additional test for ItemSpacing affecting line wrapping

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

* feat: add bindings for IsFillHorizontal and IsFillVertical in ElasticWrapPanelDemo

* Fix measure/arrange mismatch by tracking spacing in UVCollection

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

* feat: add ItemSpacing & LineSpacing FormItems.

---------

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-12-16 20:39:50 +08:00
Alexander Prokhorov
6f7db1c20c Added IconRepeatButton, IconDropDownButton, IconSplitButton, IconToggleButton, IconToggleSplitButton (#834)
* Added IconRepeatButton (#812)
* Replaced control-specific PART_RootPanel workaround with AffectsArrange call fixing ReversibleStackPanel for the whole application.

* Added IconToggleButton (#812)
* Split IconRepeatButton into separate XAML file.

* Added IconSplitButton (#812)
* Added BindableClasses utility to allow propagating Classes property between controls. Avalonia currently doesn't support binding from Classes property, and binding to Classes property is heavily restricted.

* Added IconToggleSplitButton (#812)
* Fixed tab order in IconSplitButton and IconToggleSplitButton (DockPanel messes up tab order, TabIndex is global and makes it even worse, so just switched to Grid).

* Added IconDropDownButton (#812)
* Fixed IconPlacement inheritance.

* Added redesigned IconButton demo section (#812)
* Fixed spacing issues

* Added redesigned demo sections for the newly added icon buttons (#812)

* Replaced BindableClasses with ClassHelper. Fixed styling of default solid split icon buttons. (#812)

* Replaced IIconButton with attached-like property getters and PseudolassesExtensions.Set(Classes); fixed arrow alignments in top/bottom split icon buttons (#812)

* Applied fixes suggested by Copilot in code review (#812)

* Fixed incorrect base type of IconDropDownButton (#812)

* Fixed IconSplitButton and IconToggleSplitButton styles (#812)
* Fixed secondary button color in checked state
* Fixed applying of CornerRadius
* Changed secondary button to square
* Simplified template
* Disabled demo of Colorful theme for IconSplitButton and IconToggleSplitButton
2025-11-27 22:42:42 +08:00
Dong Bin
0f1a00f388 Enhance TitleBar and CaptionButtons to respect latest Window.CanMaximize and Window.CanMinimize (#815)
* fix: enhance window resizing logic to include maximization check

* fix: update CaptionButtons to control button visibility based on window properties

* fix: update obsolescence messages for minimize and restore button properties

* chore: update comment.
2025-11-14 13:32:27 +08:00
Dong Bin
26f195871b fix: update conditional compilation symbols for .NET version handling (#820) 2025-11-12 15:43:27 +08:00
Copilot
0ab084b198 Fix NavMenu selection on right-click (#819)
* Initial plan

* Fix NavMenu right-click behavior - prevent selection on right-click

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 15:33:18 +08:00
Copilot
441f123de2 Add keyboard navigation and focus styles to TreeComboBox and MultiComboBox (#808)
* Initial plan

* Add keyboard navigation and focus styles to TreeComboBox

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

* Fix keyboard handler - add parentheses for clarity and handle Tab key properly

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

* Add keyboard navigation to MultiComboBox

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-11 23:07:26 +08:00
Copilot
6941cef2a7 Add Int64Displayer control for long type support (#811) 2025-11-07 21:35:52 +08:00
Dong Bin
dcaef1c8ed [New Control] Descriptions (#791)
* feat: add ColumnWrapPanel.

* feat: add Descriptions and DescriptionsItem controls

* WIP: extract a LabeledContentControl for this particular need.

* wip.

* feat: setup demo. fix various initial status issue.

* fix: fix a layout issue.

* feat: improve demo.

* feat: update demo.

* fix: remove a redundant calculation.

* feat: update per copilot feedback.

* feat: add tests, fix a calculation issue.

* feat: refactor to change the default label and value binding assignment logic.

* feat: introduce orientation.

* misc: format codes.

* feat: clarify LabelPosition property.

* feat: extract Font resources.

* revert AvatarDemo.

* feat: assign specific value to Font resources for testing.

* misc: resolve copilot comment.

---------

Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
2025-10-22 20:49:02 +08:00
Juster Zhu
c6ac019a4e fix: PathPicker's File Filtering Function malfunctions (#786)
* fix: PathPicker's File Filtering Function malfunctions

Regular expression validation for adding parameters; the sample reference content is as follows:

[Name,Pattern] → True
[123,.exe,.pdb] → True
[All] → True
[ImageAll] → True
[11,*.txt] → True
*.123 → False
*.txt → False
.png → False
[*.txt] → False
[.txt] → False
[a] → True
[a,b] → True
[a,b,c] → True
[a,*] → True
[a,.] → True
[*] → False
[.] → False
[a,] → False
[,a] → False
[] → False
[a,b,] → False
[a,,b] → False
[a*b] → False
[a.b] → False

* Add PathPicker regex validation and headless tests

Introduces regex-based validation for the PathPicker FileFilter property, supporting both NETSTANDARD2_0 and NET8_0 with conditional compilation. Adds headless UI tests and supporting test views to verify correct and incorrect filter patterns.

* Refactor PathPicker tests and update accessibility

Moved PathPicker unit tests from HeadlessTest.Ursa to Test.Ursa, removing UI-dependent test files and replacing them with direct unit tests for ParseFileTypes. Updated PathPicker.cs to make ParseFileTypes internal for improved testability and adjusted regex method accessibility. Updated project file to remove references to deleted test files.

* Update HeadlessTest.Ursa.csproj

* Update src/Ursa/Controls/PathPicker/PathPicker.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 23:03:11 +08:00
Dong Bin
fca5c5d0fd fix: refactor window state handling and improve visibility updates 2025-09-27 23:41:02 +08:00
Dong Bin
9611bf46ba Merge pull request #771 from yangjieshao/DialogControlClosed
增强 OverlayDialog 和 NumPad 的功能与交互体验
2025-09-19 18:15:35 +08:00
Dong Bin
baefa8c6eb fix: fix naming. 2025-09-19 18:12:42 +08:00
Dong Bin
b9cefe818f Merge pull request #773 from yangjieshao/fix_issues_590
修复 IPv4Box PinCode TimeBox  对 Delete 键的支持
2025-09-19 14:45:59 +08:00
Zhang Dian
700e512b8b Merge pull request #768 from irihitech/multi-auto
New Control: MultiAutoCompleteBox
2025-09-17 20:09:22 +08:00
杨劼
9236b9f8c8 PinCode 去除 OnPreviewKeyDown 里无意义的 TextBox 创建 2025-09-17 14:09:19 +08:00
rabbitism
f4cad108f4 fix: fix an empty selection handling. 2025-09-16 20:28:08 +08:00
rabbitism
051710affe feat: throws when collection is not initialized. 2025-09-16 20:18:28 +08:00
rabbitism
d40c2c5c90 feat: improve accessibility. 2025-09-16 20:06:03 +08:00
rabbitism
0173ee7c9c feat: implement inner content interface. 2025-09-16 19:20:02 +08:00
rabbitism
7603206b3d feat: avoid adding new item when there is not selection in ListBox. 2025-09-16 18:35:21 +08:00
杨劼
be08931b47 修复 ImageViewer.Source 设置为null会报错的问题
修复 https://github.com/irihitech/Ursa.Avalonia/issues/680
2025-09-16 18:02:37 +08:00
杨劼
26f0a3a98d 修复 IPv4Box PinCode TimeBox 对 Delete 键的支持
#https://github.com/irihitech/Ursa.Avalonia/issues/590
2025-09-16 17:22:56 +08:00
杨劼
7145201077 增强 OverlayDialog 和 NumPad 的功能与交互体验
新增 OverlayDialogOptions.OnDialogControlClosed 委托属性,
支持自定义对话框关闭事件处理逻辑,并在 OverlayDialog 中
添加了相关事件绑定与解绑逻辑。

调整 NumPad 的显示与交互逻辑,确保在数字键盘关闭后,
目标输入控件能够重新获取焦点,优化用户体验。
2025-09-16 14:04:34 +08:00
Dong Bin
88a295275c Update src/Ursa/Controls/ElasticWrapPanel.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-16 13:20:29 +08:00
杨劼
0d98aa899d 删除注释的代码 2025-09-16 11:29:56 +08:00
杨劼
890ab9c2e8 修复一处 C29236 (编译时需要绑定 lambda 表达式至少 100 次。请考虑使用显式参数类型声明 lambda 表达式,如果包含的方法调用是泛型的,请考虑使用显式类型参数。)
去除了一处完全无意义的新建 WrapPanel
去除了一处完全无意义的 获取 HotkeyConfiguration
Package.props 增加了 NoWarn 去除一下不必关心的 warn
2025-09-15 17:13:04 +08:00
rabbitism
13008225c0 test: add basic unit test, fix a search text issue. 2025-09-15 15:59:25 +08:00
rabbitism
1a9f2e9945 feat: cleanup code. add missing template parts. 2025-09-15 10:05:16 +08:00
rabbitism
214f86bb82 misc: format code. 2025-09-15 09:38:10 +08:00
rabbitism
ab8927d261 feat: add key down handling to MultiAutoCompleteBox for item removal on empty text 2025-09-14 22:09:48 +08:00
rabbitism
609607f68a feat: replace ItemsControl with MultiComboBoxSelectedItemList and add Remove command for selected items 2025-09-14 21:47:31 +08:00
rabbitism
298cc5db8b feat: add CornerRadius property to MultiAutoCompleteBox and improve focus handling logic 2025-09-14 19:20:16 +08:00
rabbitism
3b4ad2bccc feat: implement MultiAutoCompleteSelectionAdapter for enhanced selection handling 2025-09-14 18:43:21 +08:00
rabbitism
4f93801e77 feat: working on selection. add a demo to AutoCompleteBoxDemo to show the keyboard navigation actually changed selection. 2025-09-14 10:57:37 +08:00
rabbitism
8ec815c885 feat: improve demo. make textbox interactive. 2025-09-14 10:39:05 +08:00
rabbitism
452e118644 WIP: start to implement template. 2025-09-12 16:28:15 +08:00
Dong Bin
e163d671ab Improve AutoCompleteBox focus behavior for 11.3.x (#761)
* feat: improve AutoCompleteBox focus behavior for 11.3.x

* fix: open dropdown on tab navigation regardless of navigation method

* feat: update per copilot comment.

* feat: add a flag to control focus.

* fix: fix naming.
2025-09-10 21:30:56 +08:00
Dong Bin
fa7891297b feat: implement SelectedItems property in MultiAutoCompleteBox and remove SelectedItem property 2025-09-05 00:01:12 +08:00
Dong Bin
9cee8d9341 feat: bring code from Avalonia to Ursa. 2025-09-03 22:50:32 +08:00
Dong Bin
8147a05b5c feat: add TrailingWrapWidth. 2025-09-03 21:18:56 +08:00
Dong Bin
a778882c33 feat: update namespace for WrapPanelWithTrailingItem and its tests 2025-09-03 21:08:37 +08:00
Dong Bin
bce6e08561 feat: add tests. 2025-09-03 18:17:56 +08:00
Dong Bin
37aa84edfb feat: initial implemention. 2025-09-03 18:17:56 +08:00
Dong Bin
c62015a70a Merge pull request #752 from yangjieshao/main
修复了NumPad对NumericUpDown和IPv4Box的支持
2025-08-29 17:07:03 +08:00
Dong Bin
8456148acf Merge pull request #756 from irihitech/fix-multicombobox-items-in-axaml
feat: simplify closable tag.
2025-08-29 01:37:10 +08:00
Dong Bin
18e9fbe8d5 Update src/Ursa/Controls/ComboBox/MultiComboBoxSelectedItemList.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-29 01:34:11 +08:00
Dong Bin
da93b01c14 Merge pull request #749 from Samuel-B-D/fix-multicombobox-items-in-axaml
Fix MultiComboBox to works with items added in axaml
2025-08-29 01:30:52 +08:00