Skip to content

Commit

Permalink
NavigationView: Update template docs (#3824)
Browse files Browse the repository at this point in the history
* Update docs, template cleanup

* Update dev/NavigationView/docs/rendering.md

Co-authored-by: Yulia Klein <[email protected]>

Co-authored-by: Yulia Klein <[email protected]>
  • Loading branch information
marcelwgn and Yulia Klein authored Feb 16, 2021
1 parent 92dcdc0 commit e8fe446
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dev/NavigationView/NavigationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@
<!-- "Non header" content -->
<Grid x:Name="ItemsContainerGrid" Grid.Row="6" Margin="0,0,0,8">
<Grid.RowDefinitions>
<RowDefinition x:Name="MenuItemsRow" Height="Auto" MinHeight="{ThemeResource NavigationViewItemOnLeftMinHeight}"/> <!-- MenuItems -->
<RowDefinition Height="Auto" MinHeight="{ThemeResource NavigationViewItemOnLeftMinHeight}"/> <!-- MenuItems -->
<RowDefinition Height="*" MinHeight="21"/> <!-- Fill spacing -->
<RowDefinition Height="Auto" /> <!-- PaneFooter -->
<RowDefinition x:Name="FooterItemsRow" Height="Auto" MinHeight="{ThemeResource NavigationViewItemOnLeftMinHeight}"/> <!-- FooterItems -->
<RowDefinition Height="Auto" MinHeight="{ThemeResource NavigationViewItemOnLeftMinHeight}"/> <!-- FooterItems -->
</Grid.RowDefinitions>

<!-- MenuItems -->
Expand Down
27 changes: 18 additions & 9 deletions dev/NavigationView/docs/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ The first section talks about items that are used regardless of the displaymode,
the second section is for items only needed in displaymode left,
while the third section is for displaymode top.

Note that the settings item will be rendered as an element in the FooterMenu items list.

## ControlTemplate

These are the necessary control templates used for both displaymodes and how they are used in code behind.

* `RootGrid`: Template root, used for keyboardnavigation
* `RootGrid`: Template root, used for keyboard navigation
* `PaneToggleButtonGrid`: Not used
* `TogglePaneTopPadding`: Referenced to adjust padding
* `ButtonHolderGrid`: Not used
* `NavigationViewBackButton`: Allows the BackRequested event
* `NavigationViewBackButtonToolTip`: Localization of back button ToolTip
* `NavigationViewCloseButton`: Close button functionality
* `NavigationViewCloseButtonToolTip`: Localization of close button ToolTip
* `TogglePaneButton`: Used for close/open pane functionality
* `PaneTitleTextBlock`: Pane title binding and rendering
* `PaneTitleHolder`: Holds pane title presenter
Expand All @@ -42,23 +46,26 @@ For left mode, the following control template parts are used:

* `RootSplitView`: Renders the content and left pane
* `PaneContentGrid`: Used for layouting of left pane, also needed for the animation
* `ItemsContainerRow`: Used for sizing of menu items/footer items
* `ContentPaneTopPadding`: Used for height adjustments
* `PaneHeaderContentBorderRow`: Referenced for sizing adjustments
* `PaneHeaderCloseButtonColumn`: Used for CompactPaneLength adjusting of pane close buttons
* `PaneHeaderToggleButtonColumn`: Used for CompactPaneLength adjusting of pane toggle buttons
* `PaneHeaderContentBorder`: Manual sizing for pane header
* `AutoSuggestArea`: Not used
* `AutoSuggestArea`: Not referenced
* `PaneAutoSuggestBoxPresenter`: Used to check if there is content in autosuggest area
* `PaneAutoSuggestButton`: Used to open pane when button gets invoked
* `PaneCustomContentBorder`: Used for pane header rendering
* `ItemsContainerGrid`: Used for size calculations of menu and footer items views
* `MenuItemsScrollViewer`: Used to limit sizing of menu items host
* `MenuItemsHost`: Used for rendering of the NavigationViewItems
* `VisualItemsSeparator`: Referenced to dynamically show/hide the separator when needed
* `FooterContentBorder`: Used for rendering of pane footer
* `FooterMenuItemsHost`: Renders the footer menu items
* `SettingsNavPaneItem`: Allows Settings functionality
* `ContentGrid`: Shadow handling and focus behavior
* `ContentTopPadding`: Not used
* `ContentTopPadding`: Not referenced
* `ContentLeftPadding`: Used for padding of the content
* `HeaderContent`: Not used
* `HeaderContent`: Not referenced

In DisplayMode left, the SplitView is used to show/hide the pane based on the displaymode and the width of the NavigationView's width.

Expand All @@ -67,16 +74,18 @@ In PaneDisplayMode `Auto`, the pane gets hidden based on its width.
## DisplayMode Top

For displaymode Top the following parts are used:

* `TopNavLeftPadding`: Unused
* `TopNavArea`: Not referenced
* `TopNavLeftPadding`: Not referenced
* `TopNavGrid`: Used for down level support
* `BackButtonPlaceholderOnTopNav`: Not referenced
* `PaneHeaderOnTopPane`: Used for rendering of header
* `PaneTitleOnTopPane`: Used for rendering of pane title
* `TopNavMenuItemsHost`: Renders the NavigationViewItems in top mode
* `TopNavOverflowButton`: Opens an overflow menu when there is not enough space to show all items
* `TopNavMenuItemsOverflowHost`: Renders the items in the overflow flyout
* `PaneCustomContentOnTopPane`: Renders the custom pane content
* `TopPaneAutoSuggestArea`: Takes up space for the search box
* `TopPaneAutoSuggestBoxPresenter`: Renders the autosuggestbox
* `TopPaneAutoSuggestBoxPresenter`: Renders the AutoSuggestBox
* `TopFooterMenuItemsHost`: Renders the footer menu items
* `PaneFooterOnTopPane`: Shows the panefooter
* `SettingsTopNavPaneItem`: Allows settings functionality
* `TopNavContentOverlayAreaGrid`: Used for content overlays

0 comments on commit e8fe446

Please sign in to comment.