Breyta

Deila með


Cursor.Position Property

Definition

Gets or sets the position of a cursor.

public:
 property double Position { double get(); void set(double value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDateNanValueConverter))]
public double Position { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDateNanValueConverter))>]
member this.Position : double with get, set
Public Property Position As Double

Property Value

The position of a cursor.

Attributes

Remarks

This property can be used to get the position of a cursor, as well as to programmatically set the cursor position.

The position is measured as a value of the axis that the cursor belongs to, which is determined by the AxisType property. For example, if the cursor belongs to the primary X axis, then setting this property to a value of January 1, 2000 will result in the X-axis cursor being drawn at the January 1, 2000 position along the axis. If this axis value does not exist, the cursor will not be displayed.

Note that if you set this property, the Interval and IntervalOffset properties will have no effect; that is, the cursor will be displayed at this specified location.

Setting this property will not raise the CursorPositionChanged or CursorPositionChanging events.

Alternatively, the SetCursorPosition and SetCursorPixelPosition methods can be used to set the cursor.

To programmatically remove a cursor, use this property to set the position of the cursor to NaN.

Applies to