question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Fix naming of NavigationView IsBackButtonVisible property

See original GitHub issue

As 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 a boolean, but is not
  • One property is using just Back and the other is using BackButton as the name of the targeted element.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
JaiganeshKumarancommented, Jun 28, 2021

The documentations should be updated, however the API name can’t be changed without a major release version number. This wont meet our winui3 API change bar, so if it happens it will need to wait for Winui4.

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.

1reaction
mdtaukcommented, Feb 6, 2021

Is it time to start populating a backlog list of WinUI 4 projects and issues?

There already is one issue label for that: https://github.com/microsoft/microsoft-ui-xaml/issues?q=is%3Aopen+is%3Aissue+label%3AIncludeInWinui4 However projects for that might also be helpful.

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?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

NavigationView.IsBackButtonVisible Property - UWP
Gets or sets a value that indicates whether the back button is enabled or disabled. Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.
Read more >
Display the title of a UWP application containing ...
1 Answer 1 ... NavigationView is an integrated combination control, if you want to add a TextBlock on the PaneToggleButton , you can...
Read more >
Wpf page navigation mvvm. All you need to do, is to inject the pa
<NavigationView x:Name="MyNavView" IsBackButtonVisible="Collapsed" SelectionChanged=" {x:Bind ViewModel. A circular dependency error.
Read more >
WinUI 3 | XAML Brewer, by Diederik Krols | Page 2
It's often populated with a NavigationView menu and a Frame to host the different page types. Our sample app has a similar main...
Read more >
Category Name - RSSing.com
A list of applications, open source projects, and extensions from Microsoft related to R. Several upcoming R conferences offer diversity scholarships.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found