public MainWindow() { InitializeComponent(); form = this; DataContext = this; var iconManager = new IconManager(); _сurrentChoosenTab = ChooseMainModpacks; form.Activated += Form_Activated; }