Skip to content

Rename PipsPager button theme APIs#20954

Open
jsuarezruiz wants to merge 4 commits intoAvaloniaUI:masterfrom
jsuarezruiz:fix-pipspager-inconsistency
Open

Rename PipsPager button theme APIs#20954
jsuarezruiz wants to merge 4 commits intoAvaloniaUI:masterfrom
jsuarezruiz:fix-pipspager-inconsistency

Conversation

@jsuarezruiz
Copy link
Member

What does the pull request do?

This PR apply changes around API inconsistencies.

It:

  • Renames PipsPager.PreviousButtonStyle / NextButtonStyle to PreviousButtonTheme / NextButtonTheme
  • Changes NavigationPage.IsBackButtonEffectivelyVisible from bool? to bool
  • Updates Fluent and Simple themes, ControlCatalog samples, and tests to match the corrected API surface

The PipsPager rename is intentional because these properties are typed as ControlTheme and are applied through Button.Theme, so *Theme is the correct Avalonia terminology. The previous *Style names were inspired from WinUI naming, but in Avalonia they are misleading and suggest a Style based customization point that does not actually exist.

What is the current behavior?

Currently:

  • NavigationPage.IsBackButtonEffectivelyVisible is exposed as bool? even though consumers treat it as a boolean state
  • PipsPager exposes ControlTheme typed properties named PreviousButtonStyle / NextButtonStyle, which is inconsistent with Avalonia theme terminology
  • NavigationPage does not react when HasBackButton changes on the currently displayed page

What is the updated/expected behavior with this PR?

With this PR:

  • NavigationPage.IsBackButtonEffectivelyVisible is a non-nullable bool
  • PipsPager uses PreviousButtonTheme / NextButtonTheme
  • Simple and Fluent themes bind the renamed PipsPager properties correctly
  • ControlCatalog uses “Custom Button Themes” terminology consistently

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

Implementation details:

  • IsBackButtonEffectivelyVisible was updated to use a bool direct property and backing field
  • PipsPager renamed the public styled properties and both shipped themes were updated to template-bind PreviousButtonTheme/NextButtonTheme`
  • the Fluent template now consumes the existing navigation button and selection indicator background/border resources that were previously not wired into the template
  • The ControlCatalog sample page/class/title were renamed from “Custom Buttons” to “Custom Button Themes”

Checklist

Breaking changes

This PR intentionally changes public API names before release:

  • PipsPager.PreviousButtonStyle -> PipsPager.PreviousButtonTheme
  • PipsPager.NextButtonStyle -> PipsPager.NextButtonTheme
  • NavigationPage.IsBackButtonEffectivelyVisible changes from bool? to bool

Obsoletions / Deprecations

None.

Fixed issues

None.

@jsuarezruiz jsuarezruiz requested a review from MrJul March 20, 2026 09:55
Copy link
Member

@MrJul MrJul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DrawerPageTests needs updating. Otherwise LGTM!

@jsuarezruiz jsuarezruiz requested a review from MrJul March 20, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants