private void TabNameControl_Delete(object sender, RoutedEventArgs e) { if (AllTabSettings.Count == 1) { Context.Get <IMessageBox>().Information(Properties.Resources.YouCannotDeleteLastSearchSettings); } else { AllTabSettings.RemoveAt(PropertyTabControl.SelectedIndex - 2); } }
private void PropertyTabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.OriginalSource is TabControl) { if (e.AddedItems.Count == 1 && e.AddedItems[0].GetType() == typeof(DummyTabSettings)) { TabSettings settings = new DefaultSettingsFactory().CreateDefaultTabSettings(); AllTabSettings.Add(settings); PropertyTabControl.SelectedValue = settings; } UpdateBindings(); } }