From 0c96eb9e8264f4e12663ce396e83866454dfc100 Mon Sep 17 00:00:00 2001 From: Ranjesh Jaganathan <28935693+ranjeshj@users.noreply.github.com> Date: Fri, 15 Jan 2021 19:56:39 -0800 Subject: [PATCH 1/2] don't call UpdateViewport if viewport management is disabled --- .../ViewportManagerWithPlatformFeatures.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp b/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp index f9a00e10dd..a8248bccde 100644 --- a/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp +++ b/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp @@ -420,15 +420,18 @@ void ViewportManagerWithPlatformFeatures::EnsureScroller() parent = CachedVisualTreeHelpers::GetParent(parent); } - if (!m_scroller) + if (!m_managingViewportDisabled) { - // We usually update the viewport in the post arrange handler. But, since we don't have - // a scroller, let's do it now. - UpdateViewport(winrt::Rect{}); - } - else if (!m_managingViewportDisabled) - { - m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged }); + if (!m_scroller) + { + // We usually update the viewport in the post arrange handler. + // But, since we don't have a scroller, let's do it now.s + UpdateViewport(winrt::Rect{}); + } + else + { + m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged }); + } } m_ensuredScroller = true; From 1621e1bb777ad5b6a7009d56e56c1cdda6b6c85b Mon Sep 17 00:00:00 2001 From: Stephen L Peters Date: Tue, 19 Jan 2021 11:28:59 -0800 Subject: [PATCH 2/2] Update ViewportManagerWithPlatformFeatures.cpp Remove trailing s --- dev/Repeater/ViewportManagerWithPlatformFeatures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp b/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp index a8248bccde..e2c71fb72e 100644 --- a/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp +++ b/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp @@ -425,7 +425,7 @@ void ViewportManagerWithPlatformFeatures::EnsureScroller() if (!m_scroller) { // We usually update the viewport in the post arrange handler. - // But, since we don't have a scroller, let's do it now.s + // But, since we don't have a scroller, let's do it now. UpdateViewport(winrt::Rect{}); } else