private void OnInvokedDesignerActionChanged(object sender, DesignerActionListsChangedEventArgs e)
        {
            IComponent          relatedObject       = e.RelatedObject as IComponent;
            DesignerActionGlyph designerActionGlyph = null;

            if (e.ChangeType == DesignerActionListsChangedType.ActionListsAdded)
            {
                if (relatedObject == null)
                {
                    return;
                }
                IComponent primarySelection = this.selSvc.PrimarySelection as IComponent;
                if (primarySelection == e.RelatedObject)
                {
                    designerActionGlyph = this.GetDesignerActionGlyph(relatedObject, e.ActionLists);
                    if (designerActionGlyph != null)
                    {
                        this.VerifyGlyphIsInAdorner(designerActionGlyph);
                    }
                    else
                    {
                        this.RemoveActionGlyph(e.RelatedObject);
                    }
                }
            }
            if ((e.ChangeType == DesignerActionListsChangedType.ActionListsRemoved) && (e.ActionLists.Count == 0))
            {
                this.RemoveActionGlyph(e.RelatedObject);
            }
            else if (designerActionGlyph != null)
            {
                this.RecreatePanel(relatedObject);
            }
        }
 private void OnDesignerActionsChanged(object sender, DesignerActionListsChangedEventArgs e)
 {
     if ((this.marshalingControl != null) && this.marshalingControl.IsHandleCreated)
     {
         this.marshalingControl.BeginInvoke(new ActionChangedEventHandler(this.OnInvokedDesignerActionChanged), new object[] { sender, e });
     }
 }