Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara authored Jul 10, 2022
1 parent dc49105 commit 6f2fa4c
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,17 +338,20 @@ private void EnsureScrollers()
parent = CachedVisualTreeHelpers.GetParent(parent);
}

if (m_parentScrollers.Empty())
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();
}
else
{
var outerScrollerInfo = m_parentScrollers.Last();
outerScrollerInfo.Scroller.PostArrange += OnPostArrange;
//outerScrollerInfo.PostArrangeToken = outerScrollerInfo.Scroller().PostArrange(winrt::auto_revoke, { this, &ViewportManagerDownLevel::OnPostArrange });
if (m_parentScrollers.Empty())
{
// We usually update the viewport in the post arrange handler.
// But, since we don't have a scroller, let's do it now.
UpdateViewport();
}
else
{
var outerScrollerInfo = m_parentScrollers.Last();
outerScrollerInfo.Scroller.PostArrange += OnPostArrange;
//outerScrollerInfo.PostArrangeToken = outerScrollerInfo.Scroller().PostArrange(winrt::auto_revoke, { this, &ViewportManagerDownLevel::OnPostArrange });
}
}

m_ensuredScrollers = true;
Expand Down

0 comments on commit 6f2fa4c

Please sign in to comment.