public CreatureTemplateWindow() { InitializeComponent(); if (openWindow != null) { openWindow.Close(); } openWindow = this; Closing += CreatureTemplateWindow_Closing; templateListBox.ItemsSource = TemplateHandler.ListTemplateDescriptions(); templateListBox.MouseDoubleClick += TemplateListBox_MouseDoubleClick; templateListBox.SelectedIndex = 0; }