Class MarginPlacement.Resize
The size-or-margin resize every strategy builds on.
protected sealed class MarginPlacement.Resize : IResizeOperation
- Inheritance
-
MarginPlacement.Resize
- Implements
- Inherited Members
- Extension Methods
Constructors
Resize(PlacementContext, ResizeHandle, bool, bool, bool)
The size-or-margin resize every strategy builds on.
public Resize(PlacementContext context, ResizeHandle handle, bool anchorHorizontal, bool anchorVertical, bool sizeStretched = false)
Parameters
contextPlacementContextThe container and the resized element.
handleResizeHandleThe dragged handle.
anchorHorizontalboolWhether the container anchors the element horizontally, so only the width changes.
anchorVerticalboolWhether the container anchors the element vertically, so only the height changes.
sizeStretchedboolWhether a stretched axis gets an explicit size rather than a margin, for containers whose slots follow the element.
Methods
Update(Vector2)
Computes the attributes for the handle dragged by delta since the gesture started.
public IReadOnlyList<AttributeEdit> Update(Vector2 delta)
Parameters
deltaVector2The pointer's offset from where the gesture started, in the container's local units.
Returns
- IReadOnlyList<AttributeEdit>
The attribute values the element should have now.