This commit is contained in:
Carlos Zamora
2026-05-12 15:12:04 -07:00
parent 84390c5b27
commit 0fe41d7db8

View File

@@ -158,7 +158,7 @@ struct HasScrollViewer
// the next dispatcher tick so the target's final layout
// position is known before we scroll/focus.
page->Dispatcher().RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [weakControl{ winrt::weak_ref{ controlToFocus } }]() {
if (auto control = weakControl.get())
if (const auto control = weakControl.get())
{
control.UpdateLayout();
control.StartBringIntoView();