diff --git a/dev/CommonStyles/CommonStyles.vcxitems b/dev/CommonStyles/CommonStyles.vcxitems index 39fa6e5d95..4a0a39536a 100755 --- a/dev/CommonStyles/CommonStyles.vcxitems +++ b/dev/CommonStyles/CommonStyles.vcxitems @@ -113,11 +113,6 @@ RS1 ThemeResources - - Version2 - RS1 - ThemeResources - Version2 RS1 @@ -384,6 +379,17 @@ ThemeResources + + Version2 + RS1 + ThemeResources + + + Version1 + RS1 + ThemeResources + + Version2 RS1 diff --git a/dev/CommonStyles/ScrollBar_themeresources.xaml b/dev/CommonStyles/ScrollBar_themeresources.xaml index ea7e6a15ab..0deeb7320f 100755 --- a/dev/CommonStyles/ScrollBar_themeresources.xaml +++ b/dev/CommonStyles/ScrollBar_themeresources.xaml @@ -187,7 +187,6 @@ 00:00:02 00:00:02.1 12 - 1 30 8 @@ -213,7 +212,6 @@ diff --git a/dev/CommonStyles/ScrollViewer_themeresources_v1.xaml b/dev/CommonStyles/ScrollViewer_themeresources_v1.xaml new file mode 100644 index 0000000000..3a63d9618d --- /dev/null +++ b/dev/CommonStyles/ScrollViewer_themeresources_v1.xaml @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + diff --git a/dev/ScrollView/ScrollView.cpp b/dev/ScrollView/ScrollView.cpp index 44f40a882b..eb6fc435d9 100644 --- a/dev/ScrollView/ScrollView.cpp +++ b/dev/ScrollView/ScrollView.cpp @@ -1646,14 +1646,14 @@ bool ScrollView::IsInputKindIgnored(winrt::ScrollingInputKinds const& inputKind) bool ScrollView::AreAllScrollControllersCollapsed() const { - return (!m_horizontalScrollControllerElement || m_horizontalScrollControllerElement.get().Visibility() == winrt::Visibility::Collapsed) && - (!m_verticalScrollControllerElement || m_verticalScrollControllerElement.get().Visibility() == winrt::Visibility::Collapsed); + return !SharedHelpers::IsAncestor(m_horizontalScrollControllerElement.try_as() /*child*/, static_cast(*this) /*parent*/, true /*checkVisibility*/) && + !SharedHelpers::IsAncestor(m_verticalScrollControllerElement.try_as() /*child*/, static_cast(*this) /*parent*/, true /*checkVisibility*/); } bool ScrollView::AreBothScrollControllersVisible() const { - return m_horizontalScrollControllerElement && m_horizontalScrollControllerElement.get().Visibility() == winrt::Visibility::Visible && - m_verticalScrollControllerElement && m_verticalScrollControllerElement.get().Visibility() == winrt::Visibility::Visible; + return SharedHelpers::IsAncestor(m_horizontalScrollControllerElement.try_as() /*child*/, static_cast(*this) /*parent*/, true /*checkVisibility*/) && + SharedHelpers::IsAncestor(m_verticalScrollControllerElement.try_as() /*child*/, static_cast(*this) /*parent*/, true /*checkVisibility*/); } bool ScrollView::AreScrollControllersAutoHiding() diff --git a/dev/ScrollView/ScrollView.xaml b/dev/ScrollView/ScrollView.xaml index da7594ff7c..38ff9cfa44 100644 --- a/dev/ScrollView/ScrollView.xaml +++ b/dev/ScrollView/ScrollView.xaml @@ -217,18 +217,22 @@ MaxZoomFactor="{TemplateBinding MaxZoomFactor}" HorizontalAnchorRatio="{TemplateBinding HorizontalAnchorRatio}" VerticalAnchorRatio="{TemplateBinding VerticalAnchorRatio}"/> - - + + + + Padding="{ThemeResource ScrollViewScrollBarsMargin}"> + + - + - + - + + 1 + 00:00:00 00:00:00.1 00:00:02 diff --git a/dev/ScrollView/ScrollView_rs3_themeresources.xaml b/dev/ScrollView/ScrollView_rs3_themeresources.xaml index 710c021453..581fef6234 100644 --- a/dev/ScrollView/ScrollView_rs3_themeresources.xaml +++ b/dev/ScrollView/ScrollView_rs3_themeresources.xaml @@ -4,16 +4,18 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + - + - + + 1 + 00:00:00 00:00:00.1 00:00:02 diff --git a/dev/ScrollView/ScrollView_rs4_themeresources.xaml b/dev/ScrollView/ScrollView_rs4_themeresources.xaml index 44616dcd62..454e4c0799 100644 --- a/dev/ScrollView/ScrollView_rs4_themeresources.xaml +++ b/dev/ScrollView/ScrollView_rs4_themeresources.xaml @@ -4,16 +4,18 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + - + - + + 1 + 00:00:00.4 00:00:00.1 00:00:02 diff --git a/dev/ScrollView/TestUI/ScrollViewDynamicPage.xaml b/dev/ScrollView/TestUI/ScrollViewDynamicPage.xaml index 4e15535c0b..bc876144ec 100644 --- a/dev/ScrollView/TestUI/ScrollViewDynamicPage.xaml +++ b/dev/ScrollView/TestUI/ScrollViewDynamicPage.xaml @@ -80,6 +80,7 @@ @@ -101,6 +102,7 @@ + diff --git a/test/MUXControlsTestApp/Themes/DisableAnimationsStyles.xaml b/test/MUXControlsTestApp/Themes/DisableAnimationsStyles.xaml index 841b77dff0..fdc4c6c9fa 100644 --- a/test/MUXControlsTestApp/Themes/DisableAnimationsStyles.xaml +++ b/test/MUXControlsTestApp/Themes/DisableAnimationsStyles.xaml @@ -15,7 +15,7 @@