Class StackPanelPlacement
Places elements in a StackPanel: a drop lands in the nearest gap between children, and a resize along the stacking direction changes only the size, since a stack anchors its children there. A stretched child gets an explicit size on the cross axis too: the stack sizes itself to its children, so a margin couldn't grow it.
public sealed class StackPanelPlacement : MarginPlacement, IPlacementStrategy
- Inheritance
-
StackPanelPlacement
- Implements
- Inherited Members
- Extension Methods
Methods
BeginResize(PlacementContext, ResizeHandle)
Starts resizing an element of this container from handle.
public override IResizeOperation BeginResize(PlacementContext context, ResizeHandle handle)
Parameters
contextPlacementContextThe container and the element, as they were when the gesture started.
handleResizeHandleThe dragged handle.
Returns
- IResizeOperation
The operation to update while the pointer moves.
GetDropTarget(PlacementContext, Vector2)
Decides where an element dropped at point lands.
public override PlacementTarget? GetDropTarget(PlacementContext context, Vector2 point)
Parameters
contextPlacementContextThe container and the dragged element.
pointVector2Where the dragged element's top-left corner would be, in the container's local space.
Returns
- PlacementTarget
The target, or null when the container can't take the element.