Simplify TabItem initialization, remove using BOTWToolset.Debugging

This commit is contained in:
Chev 2021-06-03 21:01:21 -07:00
parent feedc548b5
commit 7c81cc08bc

View file

@ -1,5 +1,4 @@
using BOTWToolset.Debugging; using System;
using System;
using System.Reflection; using System.Reflection;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
@ -37,12 +36,13 @@ namespace BOTWToolset
foreach (UserControl tab in toolsetTabs) foreach (UserControl tab in toolsetTabs)
{ {
// Initialize the new tab // Initialize the new tab
TabItem tabItem = new TabItem(); TabItem tabItem = new TabItem
{
// Set the tab's content to whatever the tool's control is // Set the tab's content to whatever the tool's control is
tabItem.Content = tab; Content = tab,
// Give the header (tab name) a proper name based off its class name // Give the header (tab name) a proper name based off its class name
tabItem.Header = tab.GetType().Name.Replace("Tab", ""); Header = tab.GetType().Name.Replace("Tab", "")
};
TabController.Items.Add(tabItem); TabController.Items.Add(tabItem);
} }