Ejemplo n.º 1
0
        private void OnBreadCrumbDoubleClick(object sender, Point pt)
        {
            // Get any component associated with the current mouse position
            Component component = _breadCrumb?.DesignerComponentFromPoint(pt);

            if (component != null)
            {
                // Get the designer for the component
                IDesigner designer = _designerHost.GetDesigner(component);

                // Request code for the default event be generated
                designer.DoDefaultAction();
            }
        }
Ejemplo n.º 2
0
        private void OnBreadCrumbMouseUp(object sender, MouseEventArgs e)
        {
            if ((_breadCrumb != null) && (e.Button == MouseButtons.Left))
            {
                // Get any component associated with the current mouse position
                Component component = _breadCrumb.DesignerComponentFromPoint(new Point(e.X, e.Y));

                if (component != null)
                {
                    // Force the layout to be update for any change in selection
                    _breadCrumb.PerformLayout();

                    // Select the component
                    ArrayList selectionList = new()
                    {
                        component
                    };
                    _selectionService.SetSelectedComponents(selectionList, SelectionTypes.Auto);
                }
            }
        }