Class ContainerState
Namespace: RichCanvas.States.ContainerStates
Assembly: RichCanvas.dll
The base class for RichCanvas.RichCanvasContainer states.
public abstract class ContainerState
Inheritance
Derived
ContainerDefaultState, DraggingContainerState
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
ContainerState(RichCanvasContainer)
Constructs a new RichCanvas.States.ContainerStates.ContainerState.
public ContainerState(RichCanvasContainer container)
Parameters
container
RichCanvasContainer
The owner of the state.
Properties
Container
The owner of the state.
protected RichCanvasContainer Container { get; }
Property Value
Methods
Enter()
Called whenever RichCanvas.RichCanvasContainer.PushState(RichCanvas.States.ContainerStates.ContainerState) is called (becomes the RichCanvas.RichCanvasContainer.CurrentState).
Note: Used to initialize the State before any input is processed by it.
public virtual void Enter()
Exit()
Called whenever RichCanvas.RichCanvasContainer.PopState is called.
public virtual void Exit()
HandleMouseDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.Input.Mouse.MouseDown 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 virtual void HandleMouseDown(MouseButtonEventArgs e)
Parameters
The System.Windows.Input.MouseButtonEventArgs that contains the event data. This event data reports details about the mouse button that was pressed and the handled state.
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 virtual void HandleMouseMove(MouseEventArgs e)
Parameters
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 virtual void HandleMouseUp(MouseButtonEventArgs e)
Parameters
The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the mouse button was released.
PopState()
Pops the current state from the stack.
public virtual void PopState()
PushState(ContainerState)
Pushes a new state into the stack.
public virtual void PushState(ContainerState state)
Parameters
state
ContainerState
The new state.
ReEnter()
Called whenever RichCanvas.RichCanvasContainer.PopState is called.
Note: Used whenever a state switch happens in order to update the state which was suspended.
public virtual void ReEnter()