Skip to main content
A newer version of this page is available. .

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.v18.2.dll

Declaration

[XtraSerializableProperty]
[TypeConverter(typeof(BooleanTypeConverter))]
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:

Tip

This example is available on GitHub.

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;
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PrintCrosshair property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also