CursorEventArgs Class
Members of this class are used with the following events in the root Chart object: CursorPositionChanged, CursorPositionChanging, SelectionRangeChanged and SelectionRangeChanging.
Assembly: System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)
The CursorEventArgs type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CursorEventArgs(ChartArea, Axis, Double) | Initializes a new instance of the CursorEventArgs class with the specified chart area, axis, and cursor position. |
![]() | CursorEventArgs(ChartArea, Axis, Double, Double) | Initializes a new instance of the CursorEventArgs class with the specified chart area, axis, start and end positions for the new range. |
| Name | Description | |
|---|---|---|
![]() | Axis | Gets the Axis object that a cursor or range selection belongs to. |
![]() | ChartArea | Gets the ChartArea object that a cursor or range selection belongs to. |
![]() | NewPosition | Gets or sets the position of a cursor. Depending on the event, also sets the cursor's position. |
![]() | NewSelectionEnd | Gets or sets the end position of a selected range. Depending on the event, also sets the end position of the range. |
![]() | NewSelectionStart | Gets or sets the start position of a selected range. Depending on the event, also sets the start position of the range. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The CursorEventArgs class is exposed as the e parameter in the CursorPositionChanged, CursorPositionChanging, SelectionRangeChanged and SelectionRangeChanging events of the root Chart object.
This class contains the following properties:
The ChartArea property, which is used to get the ChartArea object that the event was raised for. The Name property gets the name of the chart area; other chart area properties can also be set.
The Axis property, which is used to get the Axis object that the event was raised for. To determine the type of axis—X, X2, Y or Y2—use the AxisName property. Other axis properties can also be set.
The NewPosition property, which represents the position of a cursor along an axis, measured as an axis value, at the time the event was raised. The NewPosition property can be used to get the position of a cursor. In the CursorPositionChanging event, this property can also be used to reset the cursor position.
The NewSelectionStart property, which represents the starting position of a range selection along an axis, measured as an axis value, at the time the event was raised. The NewSelectionStart property can be used to get the selected range start position. In the SelectionRangeChanging event, this property can also be used to reset the position.
The NewSelectionEnd property, which represents the end position of a range selection along an axis, measured as an axis value, at the time the event was raised. The NewSelectionEnd property can be used to get the selected range end position. In the SelectionRangeChanging event, this property can also be used to reset the position.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
