DrawingState

View as Markdown

Definition

Represents the current state of the drawing tool to perform various actions, such as building, editing, or moving.

Property Values

An enum representing the current state of the drawing tool. Possible values are:

PropertyDescription
DrawingState.BuildingThe initial state when a drawing tool is first being drawn, allowing for the anchors to be set for the drawing.
DrawingState.EditingAllows for changing the values of any of the drawing tools anchors
DrawingState.NormalThe drawing tool is normal on the chart and is not in a state to allow for changes.
DrawingState.MovingThe entire drawing tool to be moved by a user.

Syntax

DrawingState

Examples

1public override void OnMouseDown(ChartControl chartControl, ChartPanel chartPanel, ChartScale chartScale, Point point)
2{
3 switch(DrawingState)
4 {
5 case DrawingState.Normal:
6 DrawingState = DrawingState.Editing; // set state to allow editing
7 break;
8 case DrawingState.Editing:
9 // do your edits here
10 break;
11 case DrawingState.Moving:
12 return; // don't allow move when editing
13 }
14
15}