Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ private async void TabStrip_TabDroppedOutside(TabView sender, TabViewTabDroppedO
}

var indexOfTabViewItem = sender.TabItems.IndexOf(args.Tab);
var tabViewItemPath = ((((args.Item as TabItem).Content as Grid).Children[0] as Frame).Content as IShellPage).NavigationToolbar.PathControlDisplayText;
var tabViewItemPath = ((((args.Item as TabItem).Content as Grid).Children[0] as Frame).Tag as TabItemContent).NavigationArg;
var selectedTabViewItemIndex = sender.SelectedIndex;
RemoveTab(args.Item as TabItem);
if (!await Interaction.OpenPathInNewWindow(tabViewItemPath))
Expand All @@ -338,17 +338,16 @@ private async void TabStrip_TabDroppedOutside(TabView sender, TabViewTabDroppedO
}
}

private async void RemoveTab(TabItem tabItem)
private void RemoveTab(TabItem tabItem)
{
if (Items.Count == 1)
{
MainPage.AppInstances.Remove(tabItem);
await ApplicationView.GetForCurrentView().TryConsolidateAsync();
App.CloseApp();
}
else if (Items.Count > 1)
{
Items.Remove(tabItem);
//App.InteractionViewModel.TabStripSelectedIndex = verticalTabView.SelectedIndex;
}
}
}
Expand Down