public SingleElementSurface(object element, IElementDesigner designer) { SuspendLayout(); _element = element; _designer = designer; Controls.Add((Control)designer); ResumeLayout(false); }
private void RemoveDesigner(Point cell) { IElementDesigner designer = (IElementDesigner)_designers[cell]; if (designer != null) { Controls.Remove((Control)designer); _designers.Remove(cell); } }
private void RemoveDesigner(object element) { IElementDesigner designer = (IElementDesigner)_designers[element]; if (designer != null) { Controls.Remove((Control)designer); _designers.Remove(element); designer.Disposed -= new EventHandler(DesignerDisposed); } }
private void RemoveDesigner(object node) { IElementDesigner designer = (IElementDesigner)_designers[node]; if (designer != null) { if (ActiveControl == (Control)designer) { ActiveControl = null; } Controls.Remove((Control)designer); _designers.Remove(node); } }
private void ExpandNode(IElementDesigner designer) { if (designer != null) { Visual.TreeNode node = (Visual.TreeNode)designer.Element; // Collapse all children foreach (Visual.TreeNode child in node.Children) { child.Collapse(false); } // Expand this node node.Expand(false); } }
private IElementDesigner AddDesigner(object node) { IElementDesigner designer = GetDesigner(node); if (designer != null) { try { _designers.Add(node, designer); Controls.Add((Control)designer); } catch { designer.Dispose(); throw; } } return(designer); }
private IElementDesigner AddDesigner(Point cell) { IElementDesigner designer = GetDesigner(cell); if (designer != null) { try { _designers.Add(cell, designer); Controls.Add((Control)designer); } catch { designer.Dispose(); throw; } } return(designer); }
private void AddDesigner(object element) { IElementDesigner designer = GetDesigner(element); if (designer != null) { try { _designers.Add(element, designer); designer.Disposed += new EventHandler(DesignerDisposed); Controls.Add((Control)designer); } catch { designer.Dispose(); throw; } } }