Beispiel #1
0
        private void RefreshChildrensGlyphs()
        {
            bool childrenAreSelected = AreChildrenSelected();

            if (childrenAreSelected)
            {
                object selectionManager = this.GetService(ReflecionDesignHelper.GetType("System.Windows.Forms.Design.Behavior.SelectionManager", ReflecionDesignHelper.DesignAssembly));
                if (selectionManager != null)
                {
                    ReflecionDesignHelper.InvokeMethod(selectionManager, "Refresh");
                }
            }
        }
Beispiel #2
0
        /// <devdoc>
        ///     Called at the end of a resize operation -this clears state and refreshes the selection
        /// </devdoc>
        private void FinishResize()
        {
            SetNewValueOnFinishResize(lastValidValue);
            Invalidate();

            pushedBehavior = false;
            behaviorService.PopBehavior(this);
            lastMouseLoc = Point.Empty;

            // fire ComponentChange events so this event is undoable
            IComponentChangeService cs = serviceProvider.GetService(typeof(IComponentChangeService)) as IComponentChangeService;

            if (cs != null && changedProp != null)
            {
                cs.OnComponentChanged(control, changedProp, null, null);
                changedProp = null;
            }

            //attempt to refresh the selection
            object selectionManager = serviceProvider.GetService(ReflecionDesignHelper.GetType("System.Windows.Forms.Design.Behavior.SelectionManager", ReflecionDesignHelper.DesignAssembly));

            ReflecionDesignHelper.InvokeMethod(selectionManager, "Refresh");
        }