CrosshairAxisLabelOptions Class

Contains settings that define the appearance of crosshair axis labels.

Namespace: DevExpress.Xpf.Charts

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

Declaration

public class CrosshairAxisLabelOptions :
    ChartDependencyObject
Public Class CrosshairAxisLabelOptions
    Inherits ChartDependencyObject

Related API Members

The following members accept/return CrosshairAxisLabelOptions objects:

Remarks

Use the Axis2D.CrosshairAxisLabelOptions property to get access to the CrosshairAxisLabelOptions object.

The following XAML demonstrates how this can be done for the X-axis:

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts" 
        x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <dxc:ChartControl>
            <dxc:XYDiagram2D>
                <dxc:XYDiagram2D.AxisX>
                    <dxc:AxisX2D>
                        <dxc:AxisX2D.CrosshairAxisLabelOptions>
                            <dxc:CrosshairAxisLabelOptions  Background="Aqua"  Foreground="Azure" 
                                                            FontSize="14" FontStyle="Italic">
                            </dxc:CrosshairAxisLabelOptions>
                        </dxc:AxisX2D.CrosshairAxisLabelOptions>
                    </dxc:AxisX2D>
                </dxc:XYDiagram2D.AxisX>
                <dxc:LineSeries2D>
                    <dxc:SeriesPoint Argument="A" Value="3"/>
                    <dxc:SeriesPoint Argument="B" Value="6"/>
                    <dxc:SeriesPoint Argument="C" Value="7"/>
                    <dxc:SeriesPoint Argument="D" Value="9"/>
                </dxc:LineSeries2D>
            </dxc:XYDiagram2D>
            <dxc:ChartControl.CrosshairOptions>
                <dxc:CrosshairOptions ShowArgumentLabels="True" ShowValueLabels="True" />
            </dxc:ChartControl.CrosshairOptions>
        </dxc:ChartControl>
    </Grid>
</Window>
NOTE

To see the appearance changes of crosshair axis labels on a diagram, set the CrosshairOptions.ShowArgumentLabels and CrosshairOptions.ShowValueLabels properties to true.

For more information on how to use a crosshair cursor, refer to the Crosshair Cursor topic.

See Also