A class that can be used by IInputMode implementations and similar code
to manage interactive snapping of elements to other elements during a drag-like operation.
Namespace: yWorks.Canvas.InputAssembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.1.0.2
Syntax
| C# |
|---|
public class SnapContext |
| Visual Basic |
|---|
Public Class SnapContext |
Remarks
This class should be used by the drag implementation as follows:
- To initialize the operation InitializeDrag(IInputModeContext, PointD) needs to be called.
- Method DragInitialized()()()()needs to be called after the mode has performed all of its own initialization.
- Then a series of zero or more invocations of either HandleMove(PointD) or DisableSnapping()()()() needs to be called for each incremental movement of the user's input device.
- If HandleMove(PointD) had been called, the mode should perform the move and report back to the instance by calling the Dragged(PointD, SnapState) method.
- If the operation is canceled by the user CancelDrag()()()() should be called.
- If the operation is finalized the DragFinished(PointD) method should be called.
Inheritance Hierarchy
System..::..Object
yWorks.Canvas.Input..::..SnapContext
yWorks.yFiles.UI.Input..::..GraphSnapContext
yWorks.Canvas.Input..::..SnapContext
yWorks.yFiles.UI.Input..::..GraphSnapContext