Skip to content

Commit

Permalink
Merge pull request microsoft#874 from microsoft/user/karenlai/TabView…
Browse files Browse the repository at this point in the history
…TearSampleUpdate

Fix TabView Sample Tear Behaviour Bug
  • Loading branch information
karkarl authored Apr 12, 2022
2 parents 30329e9 + 28b2330 commit e23b599
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ private async void Tabs_TabItemsChanged(TabView sender, Windows.Foundation.Colle
Window.Current.Close();
}
}
// If there is only one tab left, disable dragging and reordering of Tabs.
else if (sender.TabItems.Count == 1)
{
sender.CanReorderTabs = false;
sender.CanDragTabs = false;
}
else
{
sender.CanReorderTabs = true;
sender.CanDragTabs = true;
}
}

protected override void OnNavigatedTo(NavigationEventArgs e)
Expand Down

0 comments on commit e23b599

Please sign in to comment.