Table of Contents

Class DrawingState

Namespace: RichCanvas.States
Assembly: RichCanvas.dll

Defines a new state used when a drawing action happens on RichCanvas.RichCanvas.

public class DrawingState : CanvasState

Inheritance

objectCanvasStateDrawingState

Inherited Members

CanvasState.Parent, CanvasState.Enter(), CanvasState.ReEnter(), CanvasState.Exit(), CanvasState.HandleMouseDown(MouseButtonEventArgs), CanvasState.HandleMouseMove(MouseEventArgs), CanvasState.HandleMouseUp(MouseButtonEventArgs), CanvasState.HandleKeyDown(KeyEventArgs), CanvasState.HandleKeyUp(KeyEventArgs), CanvasState.HandleAutoPanning(MouseEventArgs), CanvasState.PushState(CanvasState), CanvasState.PopState(), CanvasState.MatchesPreviewMouseDownState(MouseButtonEventArgs, out CanvasState?), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

DrawingState(RichCanvas)

Initializes a new RichCanvas.States.DrawingState.

public DrawingState(RichCanvas parent)

Parameters

parent RichCanvas

Owner of the state.

Methods

Enter()

Called whenever RichCanvas.RichCanvas.PushState(RichCanvas.States.CanvasState) is called (becomes the RichCanvas.RichCanvas.CurrentState).
Note: Used to initialize the State before any input is processed by it.

public override void Enter()

HandleAutoPanning(MouseEventArgs)

Handles auto panning when mouse is outside the canvas.

public override void HandleAutoPanning(MouseEventArgs e)

Parameters

e MouseEventArgs

HandleMouseMove(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

public override void HandleMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

The System.Windows.Input.MouseEventArgs that contains the event data.

HandleMouseUp(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

public override void HandleMouseUp(MouseButtonEventArgs e)

Parameters

e MouseButtonEventArgs

The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released.