# Sandbox.UI.CanvasPanel.Handle

A draggable panel on a canvas. By default it positions itself in canvas coordinates,
retaining its CSS size through zoom. Override the drag methods to edit other data instead.

- Kind: class
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.UI.Panel](/api/Sandbox.UI.Panel)

## Constructors

- [`Handle`](/api/Sandbox.UI.CanvasPanel.Handle/.ctor)

## Properties

- [`Anchor`](/api/Sandbox.UI.CanvasPanel.Handle/Anchor): Fraction of the panel size placed over Position. Defaults to its centre.
- [`Canvas`](/api/Sandbox.UI.CanvasPanel.Handle/Canvas): The nearest containing canvas.
- [`DragAxis`](/api/Sandbox.UI.CanvasPanel.Handle/DragAxis): Current axis restriction, including any Shift lock.
- [`DragEnabled`](/api/Sandbox.UI.CanvasPanel.Handle/DragEnabled): Allow dragging with the left mouse button.
- [`DragOrigin`](/api/Sandbox.UI.CanvasPanel.Handle/DragOrigin): Position at the start of the drag, before constraints are applied.
- [`IsDragging`](/api/Sandbox.UI.CanvasPanel.Handle/IsDragging): Whether this handle currently owns a drag.
- [`LockAxisWithShift`](/api/Sandbox.UI.CanvasPanel.Handle/LockAxisWithShift): Holding Shift at the start locks to the dominant axis after four logical pixels.
- [`MovementAxis`](/api/Sandbox.UI.CanvasPanel.Handle/MovementAxis): Restrict movement to one axis, or allow both.
- [`MovementBounds`](/api/Sandbox.UI.CanvasPanel.Handle/MovementBounds): Optional limits for the handle's position, in canvas coordinates.
- [`Position`](/api/Sandbox.UI.CanvasPanel.Handle/Position): Position in canvas coordinates. Direct canvas children retain their CSS size through zoom.
- [`Positioned`](/api/Sandbox.UI.CanvasPanel.Handle/Positioned): Position this panel automatically. Disable for a handle laid out inside another panel, such as a card heading.
- [`SnapIncrement`](/api/Sandbox.UI.CanvasPanel.Handle/SnapIncrement): Snap positions to multiples of these increments. Zero disables snapping on that axis.

## Methods

- [`FinishDrag`](/api/Sandbox.UI.CanvasPanel.Handle/FinishDrag): End this handle's drag. Cancellation is also automatic on Escape, focus/capture loss or deletion.
- [`OnButtonTyped`](/api/Sandbox.UI.CanvasPanel.Handle/OnButtonTyped)
- [`OnDeleted`](/api/Sandbox.UI.CanvasPanel.Handle/OnDeleted)
- [`Tick`](/api/Sandbox.UI.CanvasPanel.Handle/Tick)
