Inheritance: System.Windows.Controls.TabControl
 /// <summary>
 /// When overridden in a derived class, is invoked whenever application code or
 /// internal processes (such as a rebuilding layout pass) call
 /// <see cref="M:System.Windows.Controls.Control.ApplyTemplate"/>.
 /// </summary>
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     tabRibbon = this;
     root = GetTemplateChild("LayoutRoot") as Grid;
     RibbonCollapse = root.Resources["RibbonCollapse"] as Storyboard;
     RibbonExpand = root.Resources["RibbonExpand"] as Storyboard;
     PushPin = GetTemplateChild("PushPin") as Button;
     tabPanel = GetTemplateChild("TabPanelTop") as TabPanel;
     templateTop = GetTemplateChild("TemplateTop") as FrameworkElement;
     if (templateTop != null)
         templateTop.MouseLeftButtonUp += templateTop_MouseLeftButtonUp;
     if (RibbonExpand != null)
         RibbonExpand.Completed += RibbonExpand_Completed;
     if (PushPin != null)
         PushPin.Click += PushPin_Click;
 }
 /// <summary>
 /// When overridden in a derived class, is invoked whenever application code or
 /// internal processes (such as a rebuilding layout pass) call
 /// <see cref="M:System.Windows.Controls.Control.ApplyTemplate"/>.
 /// </summary>
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     tabRibbon = this;
     root = GetTemplateChild("LayoutRoot") as Grid;
     RibbonCollapse = root.Resources["RibbonCollapse"] as Storyboard;
     RibbonExpand = root.Resources["RibbonExpand"] as Storyboard;
     PushPin = GetTemplateChild("PushPin") as Button;
     if (root != null)
     {
         root.MouseEnter += LayoutRoot_MouseEnter;
         root.MouseLeave += LayoutRoot_MouseLeave;
     }
     if (RibbonExpand != null)
         RibbonExpand.Completed += RibbonExpand_Completed;
     if (PushPin != null)
         PushPin.Click += PushPin_Click;
 }
Example #3
0
 /// <summary>
 /// When overridden in a derived class, is invoked whenever application code or
 /// internal processes (such as a rebuilding layout pass) call
 /// <see cref="M:System.Windows.Controls.Control.ApplyTemplate"/>.
 /// </summary>
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     tabRibbon      = this;
     root           = GetTemplateChild("LayoutRoot") as Grid;
     RibbonCollapse = root.Resources["RibbonCollapse"] as Storyboard;
     RibbonExpand   = root.Resources["RibbonExpand"] as Storyboard;
     PushPin        = GetTemplateChild("PushPin") as Button;
     if (root != null)
     {
         root.MouseEnter += LayoutRoot_MouseEnter;
         root.MouseLeave += LayoutRoot_MouseLeave;
     }
     if (RibbonExpand != null)
     {
         RibbonExpand.Completed += RibbonExpand_Completed;
     }
     if (PushPin != null)
     {
         PushPin.Click += PushPin_Click;
     }
 }
 /// <summary>
 /// When overridden in a derived class, is invoked whenever application code or
 /// internal processes (such as a rebuilding layout pass) call
 /// <see cref="M:System.Windows.Controls.Control.ApplyTemplate"/>.
 /// </summary>
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     tabRibbon      = this;
     root           = GetTemplateChild("LayoutRoot") as Grid;
     RibbonCollapse = root.Resources["RibbonCollapse"] as Storyboard;
     RibbonExpand   = root.Resources["RibbonExpand"] as Storyboard;
     PushPin        = GetTemplateChild("PushPin") as Button;
     tabPanel       = GetTemplateChild("TabPanelTop") as TabPanel;
     templateTop    = GetTemplateChild("TemplateTop") as FrameworkElement;
     if (templateTop != null)
     {
         templateTop.MouseLeftButtonUp += templateTop_MouseLeftButtonUp;
     }
     if (RibbonExpand != null)
     {
         RibbonExpand.Completed += RibbonExpand_Completed;
     }
     if (PushPin != null)
     {
         PushPin.Click += PushPin_Click;
     }
 }