wpfui icon indicating copy to clipboard operation
wpfui copied to clipboard

NavigationView IsBackButtonVisible naming improvement

Open planetarian opened this issue 6 months ago • 1 comments

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

planetarian avatar Oct 17 '25 17:10 planetarian

I agree, but this is ported from WinUI https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.navigationview.isbackbuttonvisible?view=winrt-26100.

Nuklon avatar Nov 11 '25 14:11 Nuklon