Skip to content

Commit

Permalink
fix window crashing on last tab drag
Browse files Browse the repository at this point in the history
  • Loading branch information
karkarl committed Feb 17, 2022
1 parent b4f8c16 commit 28b2330
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 28b2330

Please sign in to comment.