Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to turn off "TopPadding" in NavigationView #47

Closed
13 of 18 tasks
jamers99 opened this issue Dec 6, 2018 · 8 comments · Fixed by #1038
Closed
13 of 18 tasks

Ability to turn off "TopPadding" in NavigationView #47

jamers99 opened this issue Dec 6, 2018 · 8 comments · Fixed by #1038
Assignees
Labels
area-NavigationView NavView control feature proposal New feature proposal team-Controls Issue for the Controls team
Milestone

Comments

@jamers99
Copy link

jamers99 commented Dec 6, 2018

The WinUI team has completed the spec for this feature

Proposal: Ability to turn off "TopPadding" in NavigationView

Summary

We want to have the NavigationView all the way to the top with ExtendViewIntoTitleBar false.
Here is a screenshot of what I want:
untitled

Rationale

I looked at the code for this and found that to achieve this I can put a small margin on my NavigationView and it works. I should not have to do this kind of hack to achieve a simple customization like this.
The logic can be found in microsoft-ui-xaml/dev/NavigationView/NavigationView.cpp at NeedTopPaddingForRS5OrHigher

Functional Requirements

A property on the NavigationView called something like "EnableAutomaticPadding"

Usage Examples

The default of the property would be true, so to turn it off I could just set it to false.

Release Checklists

Prerelease readiness

  • Dev: quality review + code review done
  • Dev: test coverage added
  • Dev: initial accessibility review done
  • Dev: telemetry implemented
  • PM: spec up to date
  • PM: feature ready for feedback
  • PM: docs.microsoft.com updates ready

Stable release readiness

  • Dev: feature previously shipped in a prerelease NuGet package
  • Dev: Azure CI tests passing
  • Dev: accessibility review done
  • Dev: API review done
  • Dev: IDL attribute switched from preview to public
  • Dev: Add test coverage to the NugetReleaseTest test
  • PM: spec done
  • PM: glob/loc, privacy, security, license compliance ready
  • PM: customer validation done
  • PM: docs.microsoft.com updated
  • PM: Xaml Controls Gallery updated
@jevansaks jevansaks added the feature proposal New feature proposal label Dec 6, 2018
@YuliKl
Copy link

YuliKl commented Dec 11, 2018

@jamers99 Thank you for the feature request, I agree with you that the top of NavigationView lacks easy customization opportunities. We're planning to add an overwritable ThemeResource to address this. A ThemeResource will allow us to keep the current default padding and also let app developers choose custom values, including 0.

This work was tracked by an internal bug (filed before we went open source). That bug is now resolved and we'll track the request here on GitHub.

@YuliKl
Copy link

YuliKl commented Dec 11, 2018

Broadening this feature request slightly. We should provide new ThemeResources for both the TopPadding on NavigationView.Content and HeaderContent margin on NavigationView.Header.

@jevansaks jevansaks added the area-NavigationView NavView control label Dec 26, 2018
@jesbis jesbis added this to New proposal in Feature tracking Jan 24, 2019
@jesbis jesbis moved this from New proposal to Review ready in Feature tracking Jan 24, 2019
@mdtauk
Copy link
Contributor

mdtauk commented Jan 25, 2019

Maybe the platform could provide a TitlebarHeight which can be consumed in XAML without having to query the OccludedRect - and this value updates on DPI changes?

This value could then be used by the NavigationView top padding when Titlebar is extended, and overridden by a non empty/null value in the app resources?

@stmoy stmoy moved this from Pending pitch to New proposal in Feature tracking Jan 28, 2019
@jevansaks jevansaks moved this from New proposal to Pending pitch in Feature tracking Jan 30, 2019
@jevansaks jevansaks added this to Approved in Controls Triage Feb 11, 2019
@jevansaks jevansaks moved this from Ready to pitch to Spec in progress in Feature tracking Feb 20, 2019
@msft-github-bot msft-github-bot added this to Spec in progress in API review status Feb 20, 2019
@jevansaks jevansaks moved this from Approved to Approved - Assigned in Controls Triage Feb 22, 2019
@YuliKl
Copy link

YuliKl commented Feb 25, 2019

Very brief spec for this feature request is now available here: microsoft/microsoft-ui-xaml-specs#8

@YuliKl YuliKl moved this from Spec in progress to Docs/samples needed in Feature tracking Mar 8, 2019
@YuliKl YuliKl moved this from Spec in progress to Ready for API review in API review status Mar 8, 2019
@jevansaks jevansaks moved this from Complete, awaiting Docs/Samples to Back Burner in Feature tracking Apr 26, 2019
@jevansaks jevansaks moved this from Back Burner to Front Burner in Feature tracking Apr 26, 2019
@msft-github-bot msft-github-bot moved this from Ready for API review to Spec in progress in API review status Apr 26, 2019
@jesbis jesbis added this to the WinUI 2.2 milestone Apr 26, 2019
@jevansaks jevansaks moved this from Approved - Assigned to Approved in Controls Triage May 7, 2019
@chrisglein chrisglein self-assigned this May 14, 2019
@YuliKl YuliKl moved this from Spec in progress to Ready for API review in API review status May 14, 2019
@chrisglein
Copy link
Member

Modest starter for whoever picks up this work: https://github.com/microsoft/microsoft-ui-xaml/tree/user/cglein/navViewTopPadding
(just adds the property, doesn't consume it)

@jevansaks jevansaks assigned RBrid and unassigned chrisglein Jul 2, 2019
@knightmeister
Copy link

Hi guys, is this still targeting 2.2?

@YuliKl
Copy link

YuliKl commented Jul 8, 2019

Hi guys, is this still targeting 2.2?

While @RBrid would know with more certainty, I believe we are still targeting WinUI 2.2

@YuliKl
Copy link

YuliKl commented Jul 17, 2019

Reopening the issue to make sure I update documentation. @RBrid, can you double-check that the Release Checklist is accurate?

@YuliKl YuliKl reopened this Jul 17, 2019
Controls Triage automation moved this from Closed to Needs triage Jul 17, 2019
Feature tracking automation moved this from Front Burner to Freezer Jul 17, 2019
@jevansaks jevansaks moved this from Needs triage to Backlog in Controls Triage Jul 22, 2019
Controls Triage automation moved this from Backlog to Closed Aug 30, 2019
@msft-github-bot msft-github-bot removed this from Freezer in Feature tracking Aug 30, 2019
@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
API review status
Ready for API review
Development

Successfully merging a pull request may close this issue.

9 participants