Crosshair_UI.CreateCrosshair(string, double) method¶
Defined in
Type: Crosshair_UI
Namespace: CrissCross.WPF.Plot
Assembly: CrissCross.WPF.Plot.dll
Applies to
net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net481
public void CreateCrosshair(string color, double position = 0)
Summary: Adds a draggable crosshair to the plot at the specified position and color.
Parameters
| Name | Type | Description |
|---|---|---|
color | string | The name of the color to use for the crosshair lines and labels. Must be a valid system color name. |
position = 0 | double | The horizontal position, in plot coordinates, where the crosshair is initially placed. Defaults to 0.0. |
Remarks
The crosshair consists of horizontal and vertical lines that can be dragged by the user. Both lines display a label with a customizable background color. If an invalid color name is provided, the crosshair may not display as intended.