Skip to content

Commit 82dae50

Browse files
committed
Merge branch 'release/v24.1.0' into main
2 parents 05c14e8 + dc1c053 commit 82dae50

File tree

112 files changed

+6697
-338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+6697
-338
lines changed
46.5 KB
Loading
6.89 KB
Loading

Documentation/docfx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"_docsCopyrightYears": "2021-2024",
5959
"_docsProductHref": "https://www.actiprosoftware.com/products/controls/avalonia",
6060
"_docsProductName": "Avalonia UI",
61-
"_docsProductVersion": "23.1",
61+
"_docsProductVersion": "24.1",
6262
"_disableContribution": true,
6363
"_enableNewTab": true,
6464
"_gitContribute": {

Documentation/topics/conversion/converting-to-v23-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Converting to v23.1"
33
page-title: "Converting to v23.1 - Conversion Notes"
4-
order: 10
4+
order: 100
55
---
66
# Converting to v23.1
77

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "Converting to v24.1"
3+
page-title: "Converting to v24.1 - Conversion Notes"
4+
order: 99
5+
---
6+
# Converting to v24.1
7+
8+
## Avalonia UI Dependency
9+
10+
Updated the minimum Avalonia UI dependency from v11.0.5 to v11.0.7.
11+
12+
## RingSlice
13+
14+
The [Ring Slice](../shared/shapes/ring-slice.md) shape was added in v23.1 and is a very handy primitive for controls that need to render an arc shape. When integrating the shape into some other controls, we found that the design needed to be slightly refactored for ease of use and to better support animation.
15+
16+
These API changes were made:
17+
- The [StartAngle](xref:@ActiproUIRoot.Controls.Shapes.RingSlice.StartAngle) property is now a `Double` instead of an [Angle](xref:ActiproSoftware.Angle).
18+
- The former `EndAngle` property is now a `Double` instead of an [Angle](xref:ActiproSoftware.Angle) and specified via the [SweepAngle](xref:@ActiproUIRoot.Controls.Shapes.RingSlice.SweepAngle) property instead. The resolved end angle is now calculated by adding the sweep angle to the start angle.
19+
20+
The end result is that if a ring slice previously specified `StartAngle="90" EndAngle="270"`, the same slice after the updates would be specified `StartAngle="90" SweepAngle="180"`.
21+
22+
## Some Image-Based Identifiers Renamed
23+
24+
Some properties and types related to `IImage` were renamed from "Image" to "ImageSource" as part of a new naming convention. Some other image-related types were also impacted. The following breaking changes were made:
25+
26+
- [UserPromptControl](xref:@ActiproUIRoot.Controls.UserPromptControl).`FooterImage` renamed as `FooterImageSource`.
27+
- [UserPromptControl](xref:@ActiproUIRoot.Controls.UserPromptControl).`StatusImage` renamed as `StatusImageSource`.
28+
- `ActiproSoftware.UI.Avalonia.Controls.Converters.ImageKeyToImageConverter` type renamed as [ImageKeyToImageSourceConverter](xref:@ActiproUIRoot.Controls.Converters.ImageKeyToImageSourceConverter)
29+
- `ActiproSoftware.UI.Avalonia.Media.SharedImageKeys` type renamed as [SharedImageSourceKeys](xref:@ActiproUIRoot.Media.SharedImageSourceKeys).
30+
31+
## ButtonCard Theme Removed
32+
33+
Previous builds contained a `ButtonCard` theme (`theme-card` style class name) for native `Button` control instances. With the introduction of the new [Card](../fundamentals/controls/card.md) control, the older `ButtonCard` theme has been removed. Those who used the old theme can use the [Card](../fundamentals/controls/card.md) control instead.
34+
35+
## Theme Resource Renamed
36+
37+
For naming consistency, the [ThemeResourceKind](xref:@ActiproUIRoot.Themes.ThemeResourceKind) enum value `NotificationBorderBrushInfo` was renamed to `NotificationBorderBrushInformation`.

Documentation/topics/conversion/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Occasionally during large updates to a product, some breaking changes are necess
99

1010
Read the following topics that are appropriate for your scenario if you are converting from an older version to the latest version.
1111

12+
- [Converting to v24.1](converting-to-v24-1.md)
1213
- [Converting to v23.1](converting-to-v23-1.md)

Documentation/topics/customizing-string-resources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ xmlns:actiproPropertiesShared="using:ActiproSoftware.Properties.Shared"
8181
Now lets use the `UITextBoxButtonShowPasswordText` resource's text as a `Button`'s tooltip content:
8282

8383
```xaml
84-
<Button ToolTip="{actiproPropertiesShared:SR UITextBoxButtonShowPasswordText}" />
84+
<Button ToolTip.Tip="{actiproPropertiesShared:SR UITextBoxButtonShowPasswordText}" />
8585
```
8686

8787
That's all there is to it!

Documentation/topics/fundamentals/controls/badge.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
9191
```xaml
9292
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
9393
...
94-
<shared:NumericBadge Count="5" />
94+
<shared:NumericBadge Count="5" />
9595
```
9696
}
9797

@@ -110,6 +110,26 @@ Use the [OverflowStringFormat](xref:@ActiproUIRoot.Controls.NumericBadge.Overflo
110110

111111
Overflow behavior can be disabled by setting [OverflowCount](xref:@ActiproUIRoot.Controls.NumericBadge.OverflowCount) to `0`.
112112

113+
> [!WARNING]
114+
> When specifying a custom [OverflowStringFormat](xref:@ActiproUIRoot.Controls.NumericBadge.OverflowStringFormat) value in XAML, prefix the actual value with `{}` to ensure the XAML parser doesn't interpret the open curly braces of the format string as a meaningful XAML delimiter.
115+
116+
The following example demonstrates how to define a [NumericBadge](xref:@ActiproUIRoot.Controls.NumericBadge) that overlows at `9` and uses a custom string format of `"{0}*"`:
117+
118+
@if (avalonia) {
119+
```xaml
120+
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
121+
...
122+
<actipro:NumericBadge Count="5" OverflowCount="9" OverflowStringFormat="{}{0}*" />
123+
```
124+
}
125+
@if (wpf) {
126+
```xaml
127+
xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
128+
...
129+
<shared:NumericBadge Count="5" OverflowCount="9" OverflowStringFormat="{}{0}*" />
130+
```
131+
}
132+
113133
## Using as an adornment
114134

115135
A common scenario for a badge is to be used as an adornment to another element. Examples include showing availability status on a user's avatar or a count of unread messages.
@@ -213,11 +233,11 @@ xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
213233
### Notes on Avalonia Adorner Issues
214234

215235
> [!WARNING]
216-
> The Avalonia adorner system may not properly clip adornments.
236+
> The Avalonia adorner system may not properly clip adornments when the adornment is outside the bounds of the adorned element.
217237
218-
The Avalonia adorner system (last tested on v11.0.7) doesn't properly clip adornments based on the clip regions of ancestors of the adorned element. This is an issue we are working with the Avalonia team to solve. A symptom of this issue can sometimes be seen when a badge adornment is used on an adorned element, that adorned element is scrolled out of view within a `ScrollViewer`, and the badge adornment remains visible.
238+
The Avalonia adorner system (last tested on v11.0.7) may not properly clip adornments based on the clip regions of ancestors of the adorned element. This is an issue we are working with the Avalonia team to solve. A symptom of this issue can sometimes be seen when a badge adornment is used on an adorned element, that adorned element is scrolled out of view within a `ScrollViewer`, and the badge adornment remains visible.
219239

220-
If this scenario is encountered, a workaround is to not use [BadgeService](xref:@ActiproUIRoot.Controls.BadgeService), thereby avoiding use of the Avalonia adorner system. Place the adorned element and the badge element in a `Panel` instead and apply the `HorizontalAlignment`, `VerticalAlignment`, and `RenderTransform` properties on the badge to position it.
240+
We believe our badge implementation has worked around this issue in most scenarios. If this scenario is still encountered, one workaround is to position the adornment within the bounds of the adorned element so clipping can be enabled. Another option is to not use [BadgeService](xref:@ActiproUIRoot.Controls.BadgeService), thereby avoiding use of the Avalonia adorner system. Place the adorned element and the badge element in a `Panel` instead and apply the `HorizontalAlignment`, `VerticalAlignment`, and `RenderTransform` properties on the badge to position it.
221241

222242
```xaml
223243
<Panel>
@@ -341,4 +361,6 @@ The following theme resources are available for customizing the appearance of th
341361
| [BadgeDotLength](xref:@ActiproUIRoot.Themes.ThemeResourceKind.BadgeDotLength) | The default [DotLength](xref:@ActiproUIRoot.Controls.Badge.DotLength) for when the badge is displayed as a "dot". |
342362
| [BadgeStringContentPadding](xref:@ActiproUIRoot.Themes.ThemeResourceKind.BadgeStringContentPadding) | The default `Padding` applied to `String`-based content. |
343363

364+
See the [Theme Assets](../../themes/theme-assets.md) topic for more details on working with theme resources.
365+
344366
}

0 commit comments

Comments
 (0)