Rename AppBar controls by jsuarezruiz · Pull Request #21041 · AvaloniaUI/Avalonia (original) (raw)

What does the pull request do?

This PR rename the newly introduced CommandBar companion control API before 12.0 final.

It renames the public AppBarButton, AppBarToggleButton, and AppBarSeparator types to:

image

It also updates the related CommandBar logic, themes, tests, and ControlCatalog samples to use the new names consistently.

In addition, it addresses CommandBarSeparator API shape by making it derive from Separator.

Related issues:

What is the current behavior?

The CommandBar control uses child controls that are still publicly named AppBar*, which is inconsistent and confusing.

Also, CommandBarSeparator currently derives directly from TemplatedControl instead of Separator, even though it conceptually represents a separator.

What is the updated/expected behavior with this PR?

The public API is now aligned with the CommandBar naming:

CommandBarSeparator now derives from Separator.

How was the solution implemented (if it's not obvious)?

This is a direct rename, without obsolete compatibility wrappers, based on the discussion in #21014.

Implementation details:

Checklist

Breaking changes

This PR contains source-breaking API changes:

Obsoletions / Deprecations

None.

Fixed issues

Fixes #21014
Fixes #21015