mirror of
https://github.com/chev2/botw-toolset.git
synced 2025-10-30 08:12:17 +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.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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue