/// <summary> /// Add tabVM to tabbed expander of type WhichTabExp(top or bottom) through ItemsSource. /// Used when new tabs are added or selected in AbleTabControl. /// </summary> /// <param name="tabVM"></param> /// <param name="WhichTabExp"></param> public virtual void AddTabInTabbedExpander(TabExpTabItemBaseVM tabVM, TabExpWhich WhichTabExp) { if (WhichTabExp == TabExpWhich.Top) { TopTabbedExpanderItemsSource.Add(tabVM); NotifyPropChanged("TopTabbedExpanderItemsSource"); } else { BottomTabbedExpanderItemsSource.Add(tabVM); NotifyPropChanged("BottomTabbedExpanderItemsSource"); } }
/// <summary> /// Add tabVM to tabbed expander of type WhichTabExp(top or bottom) through ItemsSource. /// Used when tabs are added or changed in any tabbed expander. /// </summary> /// <param name="tabVM"></param> /// <param name="WhichTabExp"></param> public virtual void AddAndSelectTabInTabbedExpander(TabExpTabItemBaseVM tabVM, TabExpWhich WhichTabExp) { if (WhichTabExp == TabExpWhich.Top) { TopTabbedExpanderItemsSource.Add(tabVM); TopTabbedExpanderSelectedIndex = this.TopTabbedExpanderItemsSource.IndexOf(tabVM); NotifyPropChanged("TopTabbedExpanderItemsSource"); } else { BottomTabbedExpanderItemsSource.Add(tabVM); BottomTabbedExpanderSelectedIndex = this.BottomTabbedExpanderItemsSource.IndexOf(tabVM); NotifyPropChanged("BottomTabbedExpanderItemsSource"); } }