Microsoft.Windows.Controls.Ribbon.RibbonApplicationSplitMenuItem.OnApplyTemplate C# (CSharp) Method

OnApplyTemplate() public method

Invoked whenever the control's template is applied.
public OnApplyTemplate ( ) : void
return void
        public override void OnApplyTemplate()
        {
            if (Level == RibbonApplicationMenuItemLevel.Top)
            {
                RibbonHelper.UnhookPopupForTopLevelMenuItem(this);
            }

            base.OnApplyTemplate();

            if (Level == RibbonApplicationMenuItemLevel.Top)
            {
                // Bind properties such as PlacementTarget, Height and 
                // Width for the submenu Popup to the parent 
                // RibbonApplicationMenu's SubmenuPlaceholder element.

                RibbonHelper.HookPopupForTopLevelMenuItem(this, ParentItemsControl);
            }
        }