Skip to main content

ChartOptionsPrint.PrintCrosshair Property

Gets or sets the value specifying whether to draw the crosshair when printing/exporting the chart.

Namespace: DevExpress.XtraCharts.Printing

Assembly: DevExpress.XtraCharts.v23.2.dll

NuGet Package: DevExpress.Charts

Declaration

public bool PrintCrosshair { get; set; }

Property Value

Type Description
Boolean

true, if the crosshair should be printed/exported with a chart; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to PrintCrosshair
ChartControl
.OptionsPrint .PrintCrosshair

Remarks

Refer to the Print and Export help topic for more information on printing/exporting the chart.

Example

This example demonstrates how the Print and Export functionality relies upon the ChartOptionsPrint.PrintCrosshair property. The Ribbon control contains two items: the Show Print Preview button and the Print Crosshair check button. The Chart Control displays the Crosshair Cursor on mouse click. When the check button is checked, the Crosshair Cursor that the Chart Control currently shows will be printed:

private void OnChartControlMouseUp(object sender, MouseEventArgs e) {
    var diagram = (XYDiagram)chartControl.Diagram;
    diagram.ShowCrosshair(e.Location.X, e.Location.Y);
}

private void OnShowPrintPreviewItemClick(object sender, ItemClickEventArgs e) {
    chartControl.ShowPrintPreview();
}

private void OnPrintCrosshairItemClick(object sender, ItemClickEventArgs e) {
    chartControl.OptionsPrint.PrintCrosshair = bciPrintCrosshair.Checked;
}
See Also