mirror of
https://github.com/chev2/botw-toolset.git
synced 2025-10-29 15:52:19 +00:00
Simplify TabItem initialization, remove using BOTWToolset.Debugging
This commit is contained in:
parent
feedc548b5
commit
7c81cc08bc
1 changed files with 8 additions and 8 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using BOTWToolset.Debugging;
|
||||
using System;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
|
@ -37,12 +36,13 @@ namespace BOTWToolset
|
|||
foreach (UserControl tab in toolsetTabs)
|
||||
{
|
||||
// Initialize the new tab
|
||||
TabItem tabItem = new TabItem();
|
||||
|
||||
// Set the tab's content to whatever the tool's control is
|
||||
tabItem.Content = tab;
|
||||
// Give the header (tab name) a proper name based off its class name
|
||||
tabItem.Header = tab.GetType().Name.Replace("Tab", "");
|
||||
TabItem tabItem = new TabItem
|
||||
{
|
||||
// Set the tab's content to whatever the tool's control is
|
||||
Content = tab,
|
||||
// Give the header (tab name) a proper name based off its class name
|
||||
Header = tab.GetType().Name.Replace("Tab", "")
|
||||
};
|
||||
|
||||
TabController.Items.Add(tabItem);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue