ResizingFrame

public class ResizingFrame
A utility type handy for resizing rectangles.

Constructors

ResizingFrame

#
public ResizingFrame(RectangleF original, SizeF min, SizeF max, SnappingConstraints snappingConstraints = null, SnappingSettings snappingSettings = null)
Set up a new resizing operation.
original (RectangleF)Original rectangle.
min (SizeF)Minimum allowed size.
max (SizeF)Maximum allowed size.
snappingConstraints (SnappingConstraints = null)Optional snapping constraints.
snappingSettings (SnappingSettings = null)Optional snapping settings. Leave null to revert to the global current settings.

Properties

MaximumSize

#
public SizeF MaximumSize { get; }
Gets the maximum allowed size.

MinimumSize

#
public SizeF MinimumSize { get; }
Gets the minimum allowed size.

Original

#
public RectangleF Original { get; }
Gets the original rectangle.

ResizeBottomEdge

#
public bool ResizeBottomEdge { get; }
Gets whether the bottom edge is being resized.

Resized

#
public RectangleF Resized { get; }
Gets the resized rectangle.

ResizeLeftEdge

#
public bool ResizeLeftEdge { get; }
Gets whether the left edge is being resized.

ResizeRightEdge

#
public bool ResizeRightEdge { get; }
Gets whether the right edge is being resized.

ResizeTopEdge

#
public bool ResizeTopEdge { get; }
Gets whether the top edge is being resized.

Methods

Begin

#
public bool Begin(PointF mouse, int edges)
Begin a resizing operation.
mouse (PointF)Mouse down location.
edges (int)Thickness of edges around rectangle boundary where resizing is allowed.
True if a resizing operation was begun.

Begin

#
public bool Begin(PointF mouse, Padding edges)
Begin a resizing operation.
mouse (PointF)Mouse down location.
edges (Padding)Thickness of edges around rectangle boundary where resizing is allowed.
True if a resizing operation was begun.

Continue

#
public void Continue(PointF mouse)
Continue a dragging operation.
mouse (PointF)

CursorAt

#
public Cursor CursorAt(PointF mouse, Padding edges)
Resolve the cursor at the given point.
mouse (PointF)
edges (Padding)