private void bItemManager_Click(object sender, RoutedEventArgs e) { var dlgIOM = new ItemOwnerManager(ItemsManagers[(int)ActiveLeagueId]); dlgIOM.Owner = this; dlgIOM.ShowDialog(); }