wpf-devexpress-dot-xpf-dot-charts-dot-chart3dcontrol-dot-showcrosshair-x28-system-dot-windows-dot-point-system-dot-boolean-x29.md
Shows the Crosshair Cursor at the point with the specified coordinates. The autoHide parameter specifies whether the Crosshair Cursor is automatically hidden.
Namespace : DevExpress.Xpf.Charts
Assembly : DevExpress.Xpf.Charts.v25.2.dll
NuGet Package : DevExpress.Wpf.Charts
public void ShowCrosshair(
Point screenPoint,
bool autoHide
)
Public Sub ShowCrosshair(
screenPoint As Point,
autoHide As Boolean
)
| Name | Type | Description |
|---|---|---|
| screenPoint | Point |
The Crosshair Cursor coordinates relative to the 3D chart’s top-left corner.
| | autoHide | Boolean |
true, if the Crosshair Cursor is hidden for a point that was removed and added again; otherwise, false
|
The following example shows the Crosshair Cursor on the MouseUp event:
private void Chart_MouseUp(object sender, MouseButtonEventArgs e) {
Chart3DControl chart = (Chart3DControl)sender;
Point point = e.GetPosition(chart);
chart.ShowCrosshair(point,false);
}
Private Sub Chart_MouseUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
Dim chart As Chart3DControl = CType(sender, Chart3DControl)
Dim point As Point = e.GetPosition(chart)
chart.ShowCrosshair(point, False)
End Sub
When a data point under the Crosshair Cursor is removed at runtime, the Crosshair Cursor is hidden. Set the autoHide parameter to false to show the Crosshair Cursor when this data point appears again in the same position.
You can use the HideCrosshair method to hide the Crosshair Cursor.
See Also