Skip to main content
All docs
V25.1
  • ChartCommands.AddHorizontalConstantLineCommand Property

    Activates the Add Horizontal Constant Line mode.

    Namespace: DevExpress.Xpf.Charts

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

    NuGet Package: DevExpress.Wpf.Charts

    Declaration

    public ICommand AddHorizontalConstantLineCommand { get; set; }

    Property Value

    Type Description
    ICommand

    An object that implements ICommand.

    Remarks

    This command activates the Add Horizontal Constant Line mode. After the command is called, users can click a chart to add a horizontal constant line with an editable title. Constant lines are added to the Axis2D.ConstantLinesInFront collection. Users can also move this constant line (ConstantLine.RuntimeMoving is True).

    <dxc:ChartControl x:Name="chart">
         <!--...-->
    </dxc:ChartControl>
    <dx:SimpleButton Content="Add Horizontal Constant Line" 
                     Command="{Binding ElementName=chart, Path=Commands.AddHorizontalConstantLineCommand}"
                     HorizontalAlignment="Left" VerticalAlignment="Top"
                     Height="20">
    </dx:SimpleButton>
    
    See Also