protected override ControlBodyGlyph GetControlGlyph(GlyphSelectionType selectionType) { ControlBodyGlyph glyph = null; SelectionManager service = (SelectionManager)this.GetService(typeof(SelectionManager)); if (service != null) { Rectangle bounds = base.BehaviorService.ControlRectInAdornerWindow(this.splitterPanel1); SplitterPanelDesigner designer = this.designerHost.GetDesigner(this.splitterPanel1) as SplitterPanelDesigner; this.OnSetCursor(); if (designer != null) { glyph = new ControlBodyGlyph(bounds, Cursor.Current, this.splitterPanel1, designer); service.BodyGlyphAdorner.Glyphs.Add(glyph); } bounds = base.BehaviorService.ControlRectInAdornerWindow(this.splitterPanel2); designer = this.designerHost.GetDesigner(this.splitterPanel2) as SplitterPanelDesigner; if (designer != null) { glyph = new ControlBodyGlyph(bounds, Cursor.Current, this.splitterPanel2, designer); service.BodyGlyphAdorner.Glyphs.Add(glyph); } } return(base.GetControlGlyph(selectionType)); }
protected override IComponent[] CreateToolCore(ToolboxItem tool, int x, int y, int width, int height, bool hasLocation, bool hasSize) { if (this.Selected == null) { this.Selected = this.splitterPanel1; } SplitterPanelDesigner toInvoke = (SplitterPanelDesigner)this.designerHost.GetDesigner(this.Selected); ParentControlDesigner.InvokeCreateTool(toInvoke, tool); return(null); }