diff --git a/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp b/dev/Repeater/ViewportManagerWithPlatformFeatures.cpp index f9a00e10dd..e2c71fb72e 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. + UpdateViewport(winrt::Rect{}); + } + else + { + m_effectiveViewportChangedRevoker = m_owner->EffectiveViewportChanged(winrt::auto_revoke, { this, &ViewportManagerWithPlatformFeatures::OnEffectiveViewportChanged }); + } } m_ensuredScroller = true;