Commit a4b3339
Bindable property for Popup (#2991)
* Refactor Popup properties to use BindableProperty attribute
Replaced manual BindableProperty implementations with the
BindableProperty attribute in the `Popup` and `PopupOptions`
classes. This simplifies property definitions, reduces boilerplate,
and improves code readability.
Updated properties such as `Margin`, `Padding`, `HorizontalOptions`,
and `VerticalOptions` in `Popup`, and `CanBeDismissedByTappingOutsideOfPopup`,
`OnTappingOutsideOfPopup`, `PageOverlayColor`, `Shape`, and `Shadow`
in `PopupOptions` to use the attribute with default value creators.
Removed redundant manual property implementations as they are now
handled by the BindableProperty attribute.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/CommunityToolkit.Maui/Views/Popup/PopupOptions.shared.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor Popup property default value handling
Updated the `CanBeDismissedByTappingOutsideOfPopup` property to use a `DefaultValueCreatorMethodName` for dynamic default value resolution. Added the `CreateCanBeDismissedByTappingOutsideOfPopup` method to provide the default value at runtime, improving flexibility and reducing reliance on hardcoded defaults.
* Use partial property initializers
* Fix XML Comments
* Fix Failing Unit Tests
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Brandon Minnick <13558917+TheCodeTraveler@users.noreply.github.com>1 parent 960d0b5 commit a4b3339
File tree
4 files changed
+31
-109
lines changed- src
- CommunityToolkit.Maui.UnitTests
- Extensions
- Services
- CommunityToolkit.Maui/Views/Popup
4 files changed
+31
-109
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
519 | 518 | | |
520 | 519 | | |
521 | 520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 11 | | |
36 | 12 | | |
37 | 13 | | |
| |||
55 | 31 | | |
56 | 32 | | |
57 | 33 | | |
58 | | - | |
| 34 | + | |
59 | 35 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 36 | + | |
| 37 | + | |
65 | 38 | | |
66 | 39 | | |
67 | | - | |
| 40 | + | |
68 | 41 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 42 | + | |
| 43 | + | |
74 | 44 | | |
75 | 45 | | |
76 | | - | |
| 46 | + | |
77 | 47 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 48 | + | |
| 49 | + | |
83 | 50 | | |
84 | 51 | | |
85 | | - | |
| 52 | + | |
86 | 53 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 54 | + | |
| 55 | + | |
92 | 56 | | |
93 | 57 | | |
94 | 58 | | |
95 | 59 | | |
96 | 60 | | |
97 | 61 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 62 | + | |
| 63 | + | |
103 | 64 | | |
104 | 65 | | |
105 | 66 | | |
| |||
148 | 109 | | |
149 | 110 | | |
150 | 111 | | |
| 112 | + | |
151 | 113 | | |
| 114 | + | |
152 | 115 | | |
Lines changed: 11 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 10 | | |
36 | 11 | | |
37 | 12 | | |
| |||
42 | 17 | | |
43 | 18 | | |
44 | 19 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 20 | + | |
| 21 | + | |
50 | 22 | | |
51 | 23 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 24 | + | |
| 25 | + | |
57 | 26 | | |
58 | 27 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 28 | + | |
| 29 | + | |
64 | 30 | | |
65 | 31 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 32 | + | |
| 33 | + | |
71 | 34 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
78 | 38 | | |
0 commit comments