/// <summary> /// Can a container be resized</summary> /// <param name="container">Container to resize</param> /// <param name="borderPart">Part of border to resize</param> /// <returns>True iff the container border can be resized</returns> bool IEditableGraphContainer <Element, Wire, ICircuitPin> .CanResize(object container, DiagramBorder borderPart) { if (container.Is <Group>()) { var group = container.Cast <Group>(); if (group.Expanded)// && !group.AutoSize) { if (borderPart.Border == DiagramBorder.BorderType.Right || borderPart.Border == DiagramBorder.BorderType.Bottom) { var layoutContext = m_viewingContext.Cast <ILayoutContext>(); BoundsSpecified specified = layoutContext.CanSetBounds(group); if ((specified & BoundsSpecified.Width) != 0 || (specified & BoundsSpecified.Height) != 0) { return(true); } } } } return(false); }
/// <summary> /// Can a container be resized</summary> /// <param name="container">Container to resize</param> /// <param name="borderPart">Part of border to resize</param> /// <returns>True iff the container border can be resized</returns> bool IEditableGraphContainer <ScriptNode, ScriptNodeConnection, ICircuitPin> .CanResize(object container, DiagramBorder borderPart) { var editableGraphContainer = DomNode.Cast <VisualScriptEditingContext>() as IEditableGraphContainer <Element, Wire, ICircuitPin>; return(editableGraphContainer.CanResize(container, borderPart)); }
/// <summary> /// Can a container be resized</summary> /// <param name="container">Container to resize</param> /// <param name="borderPart">Part of border to resize</param> /// <returns>True iff the container border can be resized</returns> bool IEditableGraphContainer <Element, Wire, ICircuitPin> .CanResize(object container, DiagramBorder borderPart) { if (container.Is <Group>()) { var group = container.Cast <Group>(); if (group.Expanded)// && !group.AutoSize) { if (borderPart.Border == DiagramBorder.BorderType.Right || borderPart.Border == DiagramBorder.BorderType.Bottom) { return(true); } } } return(false); }