Ability to turn off "TopPadding" in NavigationView
See original GitHub issueThe 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:
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:
- Created 5 years ago
- Reactions:6
- Comments:8 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Broadening this feature request slightly. We should provide new ThemeResources for both the TopPadding on NavigationView.Content and HeaderContent margin on NavigationView.Header.
Reopening the issue to make sure I update documentation. @RBrid, can you double-check that the Release Checklist is accurate?