Skip to content

Commit

Permalink
NavigationView top whitespace tweaks (#37)
Browse files Browse the repository at this point in the history
NavigationView top whitespace tweaks
  • Loading branch information
Yulia Klein authored Aug 21, 2019
1 parent 244d2a7 commit 9b44431
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions active/NavigationView/TopPadding/TopPaddingMargins.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ App developers have greater control over [customizing](https://docs.microsoft.co

# Navigation view customization

(The following is an update to the [Navigation View Customization](https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview#navigation-view-customization) guide.)

## Top whitespace
Some apps choose to [customize their window's title bar](https://docs.microsoft.com/en-us/windows/uwp/design/shell/title-bar), potentially extending their app content into the title bar area.
When NavigationView is the root element in apps that extend into the title bar, the control automatically adjusts the position of its interactive elements to prevent overlap with [the draggable region](https://docs.microsoft.com/en-us/windows/uwp/design/shell/title-bar#draggable-regions).
When NavigationView is the root element in apps that extend into the title bar **using the [ExtendViewIntoTitleBar](uwp/api/Windows.ApplicationModel.Core.CoreApplicationViewTitleBar.ExtendViewIntoTitleBar.md) API**, the control automatically adjusts the position of its interactive elements to prevent overlap with [the draggable region](https://docs.microsoft.com/en-us/windows/uwp/design/shell/title-bar#draggable-regions).
![An app extending into the title bar](NavigationView_WithTitleBarPadding.png)

If your app specifies the draggable region by calling the [Window.SetTitleBar](/uwp/api/windows.ui.xaml.window.settitlebar.md) method and you would prefer to have the back and menu buttons draw closer to the top of your app window, set `IsTitleBarAutoPaddingEnabled` to False.

![App extending into the title bar without extra padding](NavigationView_NoTitleBarPadding.png)

````Xaml
<muxc:NavigationView x:Name="NavView" IsTitleBarAutoPaddingEnabled="False">
````

### Remarks
To further adjust the position of NavigationView's header area, override the *NavigationViewHeaderMargin* XAML theme resource.

# API Details
Expand Down

0 comments on commit 9b44431

Please sign in to comment.