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.

Ability to turn off "TopPadding" in NavigationView

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
YuliKlcommented, 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.

0reactions
YuliKlcommented, Jul 17, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove padding on top of NavigationView?
I'm wondering how to remove the top padding just above the NavigationView in SwiftUI. Here's the problem: Xcode 1. Code: import SwiftUI struct ......
Read more >
Remove extra space from NavigationView
I've created a custom navigation title view class and I want to remove the extra space between the title and NavigationView.
Read more >
SOLVED: Removing unwanted and unknown whitespace ...
I've tried to make that view into a navigationView on its own (even if it doesn't really fit its purpose) to try to...
Read more >
Remove White Space NavigationView? iOS Foundations ...
Does anyone know how to remove the extra white space in a screen using a NavigationView as shown below? I tried a Spacer(),...
Read more >
Navigationstack vs navigationview. And use . sheet()). Now I ...
I'm wondering how to remove the top padding just above the NavigationView in SwiftUI. Usage In SwiftUI we have a couple of views...
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