Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Cursor Class

Represents a horizontal or vertical line that defines a position along an axis.

System.Object
  System.Windows.Forms.DataVisualization.Charting.Cursor

Namespace:  System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)
public class Cursor : IDisposable

The Cursor type exposes the following members.

  NameDescription
Public methodCursorInitializes a new instance of the Cursor class.
Top
  NameDescription
Public propertyAutoScrollGets or sets a flag that determines whether scrolling will occur if a range selection operation extends beyond a boundary of the chart area.
Public propertyAxisTypeGets or sets the type of axis that the cursor is attached to.
Public propertyIntervalGets or sets the cursor interval.
Public propertyIntervalOffsetGets or sets the interval offset, which affects where the cursor and range selection can be drawn when they are set by a user.
Public propertyIntervalOffsetTypeGets or sets the interval offset type of a cursor and selected range for an axis.
Public propertyIntervalTypeGets or sets the interval type for the cursor and selected range of an axis.
Public propertyIsUserEnabledGets or sets a flag that enables or disables the cursor user interface.
Public propertyIsUserSelectionEnabledGets or sets a flag that enables or disables the range selection user interface.
Public propertyLineColorGets or sets the cursor line color.
Public propertyLineDashStyleGets or sets the style of the cursor line.
Public propertyLineWidthGets or sets the line width, in pixels, of a cursor
Public propertyPositionGets or sets the position of a cursor.
Public propertySelectionColorGets or sets a semi-transparent color that highlights a range of data.
Public propertySelectionEndGets or sets the end position of a range selection.
Public propertySelectionStartGets or sets the start position of a cursor's selected range.
Top
  NameDescription
Public methodDispose()Performs application-defined tasks that free, release, or reset unmanaged resources.
Protected methodDispose(Boolean)Releases unmanaged and, optionally, managed resources.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetCursorPixelPositionDisplays a cursor at the specified position. Measured in pixels.
Public methodSetCursorPositionSets the position of a cursor within a chart area at the specified axis value.
Public methodSetSelectionPixelPositionSets the start and end positions of a range selection.
Public methodSetSelectionPositionSets the position of a selected range within a chart area at the specified axis values.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A cursor is a horizontal or vertical line that defines a position along an axis. A range selection is a range along an axis that is defined by a beginning and end position, and is displayed using a semi-transparent color.

Cursors and range selections are both implemented by the Cursor class, which is exposed as the CursorX and CursorY properties of the ChartArea object. The CursorX object is for the X axis of a chart area, and the CursorY object is for the Y axis. The AxisType property of these objects determines whether the associated axis is primary or secondary.

The only cursor and range selection functionality found outside the Cursor class are the events related to the cursor and range selection that are in the root Chart object.

.NET Framework

Supported in: 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.