All docs
V20.1
20.2 (EAP/Beta)
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

Gets or sets a value that specifies whether a user can move the constant line.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll

Declaration

public bool RuntimeMoving { get; set; }
Public Property RuntimeMoving As Boolean

Property Value

Type Description
Boolean

true, if the constant line can be moved; otherwise, false.

Remarks

The following example shows how to add a constant line that a user can move at runtime. Once a user moves the constant line, the constant line's title is updated to display the current constant line value.

<Window.Resources>
    <local:TitleConverter x:Key="titleConverter"/>
</Window.Resources>
<Grid>
    <dxc:ChartControl x:Name="chart" CrosshairEnabled="False">
        <dxc:XYDiagram2D>

            <dxc:XYDiagram2D.AxisY>
                <dxc:AxisY2D>
                    <dxc:AxisY2D.WholeRange>
                        <dxc:Range dxc:AxisY2D.AlwaysShowZeroLevel="False"/>
                    </dxc:AxisY2D.WholeRange>
                    <dxc:AxisY2D.ConstantLinesInFront>
                        <dxc:ConstantLine x:Name="cl" Value="25" RuntimeMoving="True">
                            <dxc:ConstantLine.Title>
                                <dxc:ConstantLineTitle Content="{Binding ElementName=cl, Path=Value, Converter={StaticResource titleConverter}}"/>
                            </dxc:ConstantLine.Title>
                        </dxc:ConstantLine>
                    </dxc:AxisY2D.ConstantLinesInFront>
                </dxc:AxisY2D>
            </dxc:XYDiagram2D.AxisY>
        </dxc:XYDiagram2D>
    </dxc:ChartControl>
</Grid>
public class TitleConverter : IValueConverter {
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
        double res;
        double.TryParse(value.ToString(), out res);
        return Math.Round(res, 3);
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
        return value;
    }
}
See Also