Skip to content

Commit

Permalink
Avoid layout cycle changing SelectedBackgroundPath Path size within T…
Browse files Browse the repository at this point in the history
…abViewItem::OnSizeChanged synchronously (#6747)
  • Loading branch information
RBrid authored Feb 20, 2022
1 parent 9351512 commit da8b658
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/TabView/TabViewItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ void TabViewItem::OnLoaded(const winrt::IInspectable& sender, const winrt::Route

void TabViewItem::OnSizeChanged(const winrt::IInspectable&, const winrt::SizeChangedEventArgs& args)
{
UpdateTabGeometry();
m_dispatcherHelper.RunAsync([strongThis = get_strong()]()
{
strongThis->UpdateTabGeometry();
});
}

void TabViewItem::OnIsSelectedPropertyChanged(const winrt::DependencyObject& sender, const winrt::DependencyProperty& args)
Expand Down

0 comments on commit da8b658

Please sign in to comment.