public OptionsMain() { InitializeComponent(); Helper.OptionsMain = this; OptionsOverlayGeneral = new OverlayGeneral(); OptionsOverlayDeckWindows = new OverlayDeckWindows(); OptionsOverlayOpponent = new OverlayOpponent(); OptionsOverlayPlayer = new OverlayPlayer(); OptionsOverlayInteractivity = new OverlayInteractivity(); OptionsTrackerExporting = new TrackerExporting(); OptionsTrackerImporting = new TrackerImporting(); OptionsTrackerLogging = new TrackerLogging(); OptionsTrackerStats = new TrackerStats(); OptionsTrackerExporting = new TrackerExporting(); OptionsTrackerSettings = new TrackerSettings(); OptionsTrackerGeneral = new TrackerGeneral(); OptionsTrackerPlugins = new TrackerPlugins(); OptionsTrackerAppearance = new TrackerAppearance(); OptionsTrackerBackups = new TrackerBackups(); try { foreach (var treeItem in TreeViewOptions.Items.Cast <TreeViewItem>()) { treeItem.ExpandSubtree(); } //select overlay - general TreeViewOptions.Items.Cast <TreeViewItem>().First().Items.Cast <TreeViewItem>().First().IsSelected = true; } catch (Exception e) { Logger.WriteLine(e.ToString(), "Options"); } }