Commit Graph

76 Commits

Author SHA1 Message Date
Gehongyan
47feb76af1 fix: fix CanDragMoveProperty for custom draggable area
1. Fixed the issue where specifying CanDragMoveProperty for components within the dialog in the user's code did not enable custom draggable area support.
2. Renamed title pointer event handlers for clarity, which represent handlers for all draggable areas besides the title.

Fixes irihitech/Ursa.Avalonia#643
2025-04-08 12:49:09 +08:00
rabbitism
8df275cc12 feat: use common separator. 2024-11-22 13:03:34 +08:00
rabbitism
868edb57b5 fix: revert collection expression. 2024-11-22 12:02:05 +08:00
rabbitism
c57bf10511 feat: support multiple classes, improve unit tests. 2024-11-06 23:22:17 +08:00
rabbitism
ee707cd977 feat: add styleClass as an option to Dialogs. 2024-11-03 01:19:42 +08:00
LUJIAN2020
f57b882924 Update OverlayDialog.cs
DataContext repeated assignment
2024-09-22 10:56:59 +08:00
rabbitism
dccb3c029c Refactor and optimize overlay dialog handling and resizing logic
- Remove unused `_moveDragging` variable in `OverlayFeedbackElement.cs`
- Rename private static animations to follow PascalCase in `OverlayDialogHost.Shared.cs`
- Simplify and streamline `ClickMaskToCloseDialog`, `OnPointerMoved`, `OnPointerPressed`, and `OnPointerReleased` methods in `OverlayDialogHost.Dialog.cs`
- Remove redundant null checks and streamline method calls in various files
- Optimize `_moveDragging` logic and pointer event handling in `DialogControlBase.cs`

This commit enhances readability, maintains consistency in naming conventions, and optimizes the code for better performance and clarity.
2024-09-18 02:37:17 +08:00
rabbitism
5799646488 Refactor and enhance overlay feedback handling
- Promote `_containerPanel` to a protected property for better accessibility
- Extract `CoerceDelta` method to centralize constraint logic
- Implement `AnchorAndUpdatePositionInfo` across dialog controls for consistent positioning behavior
- Adjust margin binding for `DialogResizer` to include parent border margin
- Simplify pointer movement calculations and conditional checks
2024-09-18 02:08:58 +08:00
rabbitism
219ead2172 Add CanResize property to drawers and dialogs with corresponding UI controls
This commit introduces a new `CanResize` property to `DrawerOptions`, `OverlayDialogOptions`, and their respective controls. It also adds UI resizing functionality through the `DialogResizer` control, with styles adjusted to support different drawer positions. Code formatting and organization have been improved for readability across modified files.
2024-09-17 23:06:00 +08:00
rabbitism
c512cb6e13 Add resize functionality and improve dialog controls
This commit introduces the ability to resize dialogs by adding `CanResize` properties to dialog options and control classes. It also refines dialog controls' behavior and layout, ensuring consistent resizing capabilities across different dialog types. Additionally, it enhances the overlay feedback element's positioning logic and updates the resizer's appearance and visibility handling.
2024-09-17 22:44:35 +08:00
rabbitism
e90189bbca feat: 1. make full-screen dialog draggable to trigger window moving
2. Make sure full-screen is always full-screen when resizing window.
2024-09-11 22:49:37 +08:00
rabbitism
db1889d454 feat: Add CanDragMove option to dialogs and make sure it can be disabled. 2024-09-07 01:42:51 +08:00
rabbitism
36aa3b9dec feat: try to focus on dialog and make tab navigation cycled. 2024-09-01 16:26:43 +08:00
rabbitism
38676f729e feat: improve drawer demo. fix drawer close button visibility issue. 2024-08-25 23:33:04 +08:00
rabbitism
1d3e21e5a6 feat: add new dialog samples. 2024-08-25 22:58:48 +08:00
rabbitism
9758e1b826 feat: improve dialog demo layout. 2024-08-25 21:49:48 +08:00
rabbitism
f5726dbafc feat: respect close button visibility in all options. 2024-08-25 15:14:55 +08:00
rabbitism
51a1e43608 feat: unify option name. 2024-08-01 12:06:41 +08:00
rabbitism
15fb5a2d1b feat: clean up warnings. 2024-07-30 18:33:30 +08:00
rabbitism
9cbefe6307 feat: OverlayDialogHost remake: support host with same id in different toplevel. support modal status propagation. 2024-07-08 15:39:48 +08:00
芬里尔吉崽
fa6899e432 remove duplicate code 2024-06-17 14:05:11 +08:00
芬里尔吉崽
5eff797d5c Add Icon for dialogwindow
Add ShowInTaskBar for DialogOptions
2024-06-17 14:01:01 +08:00
rabbitism
13e5629b21 feat: support full screen. 2024-03-27 18:29:54 +08:00
rabbitism
0349f6ad95 feat: make sure MessageBox support drag move. 2024-03-27 17:37:46 +08:00
rabbitism
51d7c3c870 feat: add recall as internal function to overlay dialog. 2024-03-09 18:52:26 +08:00
rabbitism
7a9bdf231d feat: simplify dialog option. 2024-02-10 00:42:44 +08:00
rabbitism
974afa33c5 feat: add two attached properties to mark an custom element triggering drag move or close. 2024-02-08 23:15:26 +08:00
rabbitism
508c362509 feat: replace IDialogContext by shared library. 2024-02-07 21:25:47 +08:00
rabbitism
9259228365 fix: fix close order. 2024-02-07 19:07:51 +08:00
rabbitism
7e57a0c0ef feat: refactor to simplify null control property and event initialization. 2024-02-07 19:04:51 +08:00
rabbitism
fd85efd895 feat: basic position. 2024-02-05 19:40:11 +08:00
rabbitism
8e085bc264 feat: refactor layer storage and index reset rule. 2024-02-05 17:56:36 +08:00
rabbitism
2ac5dfa170 feat: WIP. 2024-02-05 01:22:55 +08:00
rabbitism
5b8763bc4a feat: add appear animation. 2024-02-04 17:36:37 +08:00
rabbitism
dbbf6b62b6 feat: refactor dialog host to accept drawer. 2024-02-04 17:13:01 +08:00
rabbitism
ff8d4b1dcd WIP: animation. 2024-02-04 16:06:34 +08:00
rabbitism
f3cd4fb74b feat: WIP set up interface. 2024-02-04 12:32:08 +08:00
rabbitism
ed21ee8189 feat: pre job: change events to routed events. 2024-02-04 02:07:45 +08:00
rabbitism
15203b4284 feat: fix MessageBox default position, use internal option default instance. 2024-02-03 21:46:44 +08:00
rabbitism
6d20264c6a feat: fix bottom and right anchoring. 2024-02-03 21:36:47 +08:00
rabbitism
2b022a5b53 feat: set close button visibility from option. 2024-02-03 20:14:48 +08:00
rabbitism
39457f9724 feat: re-organize file, add IsCloseButtonVisible option. 2024-02-03 20:07:39 +08:00
rabbitism
96ca0d9075 feat: make closedialog internal. 2024-02-02 20:37:55 +08:00
rabbitism
3ee3e713a5 fix: fix close from non-ui thread. 2024-02-02 20:35:11 +08:00
rabbitism
97d641f8a1 fix: fix divided by zero issue. 2024-02-02 20:16:35 +08:00
rabbitism
75503b8055 feat: advanced dialog layout. 2024-02-02 19:58:52 +08:00
rabbitism
6e8ab8c16d feat: add cancellation token support. 2024-02-02 15:24:02 +08:00
rabbitism
7e488d29c2 feat: add CloseOnMaskToClose 2024-02-02 00:41:09 +08:00
rabbitism
1d01022a03 feat: use another datatemplate collection. 2024-02-02 00:27:46 +08:00
rabbitism
8f4d88b87f feat: refactor OverlayDialog and add options. 2024-02-02 00:01:18 +08:00