Proposal: Fix naming of NavigationView IsBackButtonVisible property
See original GitHub issueAs discussed on Twitter here by @samafshari
Proposal: Rename NavigationView IsBackButtonVisible
property to align to its type/conventions
Summary
Currently NavigationView
has two properties IsBackEnabled
and IsBackButtonVisible
. They both have the same documentation string and indicate to the developer that they should be boolean
values by using the Is
naming guideline.
However, IsBackButtonVisible
is an enum
instead which can be set to Auto
, Visible
, or Collapsed
.
If the IsBackEnabled
there to be able to show the button but have it not be clickable, then that should be made clearer in the docs. This is probably an issue with the doc string on the IsBackButtonVisible
property having the same text as IsBackEnabled
. Otherwise, if it’s still about just showing if the button is there or not, it should be removed.
I propose that IsBackButtonVisible
should be BackButtonVisibility
property which is the enum
value set. (Or BackVisibility
if the IsBackEnabled
property does indeed perform a different action and remains or brevity is important.)
Rationale
To summarize, there seems to be a few problems here with API consistency:
- Both properties seem to perform similar functions making understanding what they do when combined difficult or know which to use when
IsBackButtonVisible
indicated it should be aboolean
, but is not- One property is using just
Back
and the other is usingBackButton
as the name of the targeted element.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top GitHub Comments
Well, you can add a new property instead of the same type and then tell in docs not to use the old one. Just like how DisplayMode and PaneDisplayMode coexist in NavigationView. Not the best approach but works.
I was hoping WinUI 3 would be a stable base to build on - but if there are things off limits for change until a v4 or v5 - what is the release frame for those?
I figured 3.0 - 3.9 - 3.22 | so is 4.0 several years away, or does 3.0 only go up to about 3.4 (as in 4 minor updates a year?)