Skip to content

NavigationView IsBackButtonVisible naming improvement #1550

@planetarian

Description

@planetarian

Is your feature request related to a problem? Please describe

Currently, within NavigationView, we have IsBackButtonVisible, which accepts a Visibility value.

However, if we observe WPF convention:
IsXVisible implies a Boolean value -- either it is visible, or it is not.
XVisibility implies a Visibility value -- Collapsed, Hidden, or Visible.

Currently the property name implies a Boolean value, but accepts a Visibility-like value. This goes against WPF convention -- as well as other visibility properties within the same control -- and can cause confusion.

Image

Describe the solution you'd like

The name is changed to BackButtonVisibility to match the convention for the apparent value it accepts. Not perfect since the value isn't a 'true' Visibility Enum, and e.g. converters that return Visibility values may not work with it as someone might expect, but probably avoids the most confusion.

Describe alternatives you've considered

The alternative of using a Boolean-like enum value (accepting true/false/auto instead of visible/collapsed/auto) would also be less confusing to write, though it might create its own issues if people assume it accepts a true boolean.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions