6.4 KiB
AtomUI 6.2.0 API Change Examples
AtomUI 6.2.0 contains intentional API breaking changes across desktop input, button, base controls, notification, and transfer controls. The replacement behavior is described below.
Chinese version: AtomUI 6.2.0 API 变更示例.
Quick reference
| Area | Before 6.2.0 | 6.2.0 migration |
|---|---|---|
| SearchEdit enum | SearchEditButtonStyle |
SearchButtonType |
| OtpLineEdit separators | SeparatorInterval controlled which cell boundaries displayed Separator |
Separator is rendered between every adjacent cell; use SeparatorTemplate for custom content and the OTP token CellGap for overall cell spacing |
| Button surface | CustomBackground |
Set the standard Background property directly; set BorderBrush for the outline |
| Theme manager implementers | IThemeManager had no Semantic Part registry member |
Add a SemanticParts property to custom IThemeManager implementations, or use the built-in ThemeManager |
| Notification manager implementations | IMessageManager and INotificationManager had no DestroyAll member |
Add both methods to custom implementations |
| ProgressBar inheritance | AbstractGeneralProgressBar.DrawIndicatorBar was protected |
Implement custom drawing in derived controls or use the template and Semantic Part styling surface |
| Separator dash styles | AbstractSeparator.DashStyle and DotStyle |
Use SeparatorRail.DashStyle and SeparatorRail.DotStyle where direct access is needed |
SearchEdit: rename SearchEditButtonStyle
The public enum SearchEditButtonStyle is now SearchButtonType. The SearchButtonStyle property keeps its
name and values (Default and Primary), but its type changes. The same type change applies to
AutoCompleteSearchEdit.SearchButtonStyle.
Before 6.2.0
var search = new SearchEdit
{
SearchButtonStyle = SearchEditButtonStyle.Primary
};
6.2.0
var search = new SearchEdit
{
SearchButtonStyle = SearchButtonType.Primary
};
Update C# using statements and any XAML or generated code that refers to the old enum type. The property,
its values, search events and button behavior remain unchanged. The rename removes a collision with the generated
Semantic Part style class exposed through the shared atom: XAML namespace.
OtpLineEdit: remove SeparatorInterval
OtpLineEdit.SeparatorInterval and SeparatorIntervalProperty have been removed. When Separator is set,
6.2.0 renders it between each pair of neighboring cells, matching the Ant Design OTP separator contract. A
custom SeparatorTemplate still receives OtpLineEditSeparatorContext; its separator index is the boundary's
one-based position.
Before 6.2.0
var otp = new OtpLineEdit
{
Length = 6,
Separator = "-",
SeparatorInterval = 3
};
6.2.0
var otp = new OtpLineEdit
{
Length = 6,
Separator = "-"
};
If an application needs grouped cells, compose separate OtpLineEdit instances or provide a custom template
and layout. Use the OtpLineEditToken.CellGap token to adjust the spacing of the cell host; it does not change
the separator contract or the value of Text.
Button: remove CustomBackground
Button.CustomBackground, Button.CustomBackgroundProperty, and the internal custom-background overlay have
been removed. Set the normal Background and BorderBrush properties instead. These values now remain the
user-selected surface through hover, pressed and disabled states, matching normal inline style behavior.
Before 6.2.0
<atom:Button CustomBackground="#1677FF" Content="Save" />
6.2.0
<atom:Button Background="#1677FF" Content="Save" />
For a gradient or a programmatic value, assign the same brush to Background. Use BorderBrush for a custom
outline; no additional overlay or template part is required.
Transfer protected method return types
The protected extension methods AbstractTransfer.BuildSourcePanelSource and
AbstractTransfer.BuildTargetPanelSource now return IReadOnlyList<IItemKey>?. Custom derived Transfer controls
that override or call these methods must update their signatures and consuming code.
ProgressBar: remove the protected drawing helper
AbstractGeneralProgressBar.DrawIndicatorBar(DrawingContext, double, IBrush) is now an implementation detail and
is no longer protected. Derived progress controls that called it must own their drawing implementation or move the
customization into the control template and Semantic Part styling surface.
Separator: use SeparatorRail dash styles
The static DashStyle and DotStyle accessors were removed from AbstractSeparator when line rendering moved to
the template-owned SeparatorRail. Code that needs the standard dash definitions can use
SeparatorRail.DashStyle and SeparatorRail.DotStyle.
Notification lifetime and manager APIs
WindowNotificationManager.CardExpiredPollingInterval and CleanupPollingInterval were removed. The manager now
coordinates expiration and cleanup through one scheduler; progress refresh is configured by the scheduler.
The notification token model also follows the current source declarations. The removed
NotificationMarginBottom, NotificationContentMargin, and HeaderMargin token members are replaced by the
more specific notification spacing tokens documented by the control theme.
IMessageManager.DestroyAll() and INotificationManager.DestroyAll() are new interface members. Custom
manager implementations must add the method; built-in managers close all active cards or messages.
Theme manager: implement SemanticParts
The Semantic Part registry is now exposed through IThemeManager.SemanticParts. This is an intentional interface
contract extension: applications that implement IThemeManager themselves must add the property and return a
SemanticPartRegistry. Applications using AtomUI's built-in ThemeManager require no code change.
public sealed class CustomThemeManager : IThemeManager
{
public SemanticPartRegistry SemanticParts { get; } = SemanticPartRegistry.Empty;
// Implement the remaining IThemeManager members as before.
}
Compatibility notes
The changes above are the breaking changes identified in the v6.1.9 to v6.2.0 audit. The content-addressed repository build-task cache introduced in this range is an internal source-build implementation detail; the published package build contract remains unchanged.