Beispiel #1
0
 /// <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");
     }
 }
Beispiel #2
0
 /// <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");
     }
 }
Beispiel #3
0
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            TabExpTabItemBaseVM TabItem = item as TabExpTabItemBaseVM;

            if (TabItem == null)
            {
                return(null);
            }

            TabExpTabType type = (item as TabExpTabItemBaseVM).TabExpType;

            switch (type)
            {
            case TabExpTabType.Mayor1_Cuenta:
                TabItem.Header = "Cuenta";
                DataTemplate dtemp = (DataTemplate)Application.Current.Resources["TabExpTabMayor_Cuenta"];
                return(dtemp);

            case TabExpTabType.Mayor3_Buscar:
                TabItem.Header = "Buscar";
                dtemp          = (DataTemplate)Application.Current.Resources["TabExpTabMayor_Buscar"];
                return(dtemp);

            case TabExpTabType.Inferior_AsientoSimple:
                TabItem.Header = "Asiento simple";
                dtemp          = (DataTemplate)Application.Current.Resources["TabExpTabInferior_AsientoSimple"];
                return(dtemp);

            case TabExpTabType.Inferior_AsientoComplejo:
                TabItem.Header = "Asiento complejo";
                dtemp          = (DataTemplate)Application.Current.Resources[""];
                return(dtemp);

            case TabExpTabType.Inferior_Diario:
                TabItem.Header = "Vista Diario";
                dtemp          = (DataTemplate)Application.Current.Resources["TabExpTabInferior_Diario"];
                return(dtemp);

            default: return(null);
            }
        }