public IconPacksWindow() { DataContext = new IconPacksViewModel(); InitializeComponent(); this.Loaded += (sender, args) => ((IconPacksViewModel)this.DataContext).Initialize(); }