All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ConstantLine.RuntimeMoving Property

Specifies whether a user can move the constant line.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public bool RuntimeMoving { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Property RuntimeMoving As Boolean

Property Value

Type Description
Boolean

true, if a user can move the constant line; otherwise, false.

Remarks

The ChartControl.ConstantLineMoved event occurs when a user moves a constant line.

Example

The following example adds a horizontal constant line with an editable title. Once a user moves a constant line, the title is updated to display the current constant line value.

private void OnFormLoad(object sender, EventArgs e) {

    ConstantLine constantLine = new ConstantLine();
    constantLine.AxisValue = 65.0;
    constantLine.Title.Text = "Title";    
    constantLine.RuntimeTitleEditing = true;
    constantLine.RuntimeMoving = true;

    XYDiagram diagram = chartControl1.Diagram as XYDiagram;
    diagram.AxisY.ConstantLines.Add(constantLine);

    chartControl1.ConstantLineMoved += OnChartControlConstantLineMoved;
}

private void OnChartControlConstantLineMoved(object sender, ConstantLineMovedEventArgs e) {
    e.ConstantLine.Title.Text = String.Format("{0:f3}",e.ConstantLine.AxisValue);
}
See Also