From 08c21028e8253493e4ac7cf00e12e94c3203ca01 Mon Sep 17 00:00:00 2001 From: Karen Lai Date: Mon, 22 Mar 2021 17:28:04 -0700 Subject: [PATCH 01/15] add OverlayStateGroup and logic --- dev/NavigationView/NavigationView.cpp | 13 +++++++++++++ dev/NavigationView/NavigationView.xaml | 16 +++++++++++++++- .../TestUI/Common/NavigationViewPage.xaml | 3 ++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/dev/NavigationView/NavigationView.cpp b/dev/NavigationView/NavigationView.cpp index 0bf63d2248..d76ead3252 100644 --- a/dev/NavigationView/NavigationView.cpp +++ b/dev/NavigationView/NavigationView.cpp @@ -1698,6 +1698,11 @@ void NavigationView::OnSplitViewPaneClosing(const winrt::DependencyObject& /*sen winrt::VisualStateManager::GoToState(*this, L"ListSizeCompact", true /*useTransitions*/); UpdatePaneToggleSize(); } + + if (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay) + { + winrt::VisualStateManager::GoToState(*this, L"NotOverlay", true /*useTransitions*/); + } } } } @@ -1714,6 +1719,14 @@ void NavigationView::OnSplitViewPaneOpening(const winrt::DependencyObject& /*sen { // See UpdateIsClosedCompact 'RS3+ animation timing enhancement' for explanation: winrt::VisualStateManager::GoToState(*this, L"ListSizeFull", true /*useTransitions*/); + + if (auto splitView = m_rootSplitView.get()) + { + if (splitView.DisplayMode() == winrt::SplitViewDisplayMode::CompactOverlay || splitView.DisplayMode() == winrt::SplitViewDisplayMode::Overlay) + { + winrt::VisualStateManager::GoToState(*this, L"Overlay", true /*useTransitions*/); + } + } } m_paneOpeningEventSource(*this, nullptr); diff --git a/dev/NavigationView/NavigationView.xaml b/dev/NavigationView/NavigationView.xaml index e9b85c403e..d37216a290 100644 --- a/dev/NavigationView/NavigationView.xaml +++ b/dev/NavigationView/NavigationView.xaml @@ -118,6 +118,19 @@ + + + + + + + + + + + + + @@ -431,7 +444,8 @@ HorizontalAlignment="Left" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.LeftPaneVisibility}" BorderBrush="{ThemeResource NavigationViewItemSeparatorForeground}" - BorderThickness="0,0,1,0"> + BorderThickness="0,0,1,0" + contract7Present:CornerRadius="0"> diff --git a/dev/NavigationView/TestUI/Common/NavigationViewPage.xaml b/dev/NavigationView/TestUI/Common/NavigationViewPage.xaml index f037bf57dc..bcf5b5a0e2 100644 --- a/dev/NavigationView/TestUI/Common/NavigationViewPage.xaml +++ b/dev/NavigationView/TestUI/Common/NavigationViewPage.xaml @@ -325,7 +325,8 @@ Nullam egestas, orci sed molestie aliquet, diam ex euismod risus, ac dapibus qua