void CustomMenusSet_Loaded(object sender, RoutedEventArgs e) { if (ViewModel.Context.Managed != null) { if (ViewModel.Context.Managed.Catalog != null) { if (ViewModel.Context.Managed.Catalog.Count > 0) { bIsLoaded = true; } } } if (!bIsLoaded) { InitMenu(); return; } if (this.tabControl1.Items == null) { _menuViewModel = new MainMenuViewModel(); BindControls(); return; } if (this.tabControl1.Items.Count == 0) { _menuViewModel = new MainMenuViewModel(); BindControls(); return; } }
void _splashScreen_InitCompleted(object sender, EventArgs e) { if (this.tabControl1.Items != null) { this.tabControl1.Items.Clear(); cache.Clear(); } _menuViewModel = new MainMenuViewModel(); BindControls(); Stop(); }