private void SetContextualTabs(RibbonContextualTabSet newSet)
 {
     if (newSet != null) newSet.IsSelected = true;
     if (tabItemContainer != null && newSet != null)
     {
         foreach (RibbonTabItem tab in newSet.Tabs)
         {
             tabItemContainer.Children.Add(tab);
             tab.IsContextual = true;
         }
     }
 }
 private void RemovePreviousContextualTabs(RibbonContextualTabSet oldSet)
 {
     if (oldSet != null) oldSet.IsSelected = false;
     if (tabItemContainer != null && oldSet != null)
     {
         foreach (RibbonTabItem tab in oldSet.Tabs)
         {
             tab.IsContextual = false;
             tabItemContainer.Children.Remove(tab);
         }
     }
 }
 private void AdjustContextualTabSet(RibbonContextualTabSet set)
 {
 }