ערוך

שתף באמצעות


CursorEventArgs Class

Definition

Provides properties that are used with the following events in the root Chart object: CursorPositionChanged, CursorPositionChanging, SelectionRangeChanged and SelectionRangeChanging.

public ref class CursorEventArgs : EventArgs
public class CursorEventArgs : EventArgs
type CursorEventArgs = class
    inherit EventArgs
Public Class CursorEventArgs
Inherits EventArgs
Inheritance
CursorEventArgs

Remarks

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.

Constructors

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.

Properties

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.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(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)

Applies to