Cursor 类

定义

表示沿 X 轴定义位置的横线或竖线。Represents a horizontal or vertical line that defines a position along an axis.

public ref class Cursor : IDisposable
public class Cursor : IDisposable
type Cursor = class
    interface IDisposable
Public Class Cursor
Implements IDisposable
继承
Cursor
实现

注解

光标是沿轴定义位置的水平或垂直直线。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.

游标和范围选择由 Cursor 类实现,该类作为 CursorX 对象的和属性公开 CursorY ChartAreaCursors and range selections are both implemented by the Cursor class, which is exposed as the CursorX and CursorY properties of the ChartArea object. CursorX对象用于图表区域的 X 轴,而 CursorY 对象用于 Y 轴。The CursorX object is for the X axis of a chart area, and the CursorY object is for the Y axis. AxisType这些对象的属性确定关联的轴是主要轴还是辅助轴。The AxisType property of these objects determines whether the associated axis is primary or secondary.

在类外部找到的唯一游标和范围选择功能 Cursor 是与根对象中的光标和范围选择相关的事件 ChartThe 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.

构造函数

Cursor()

初始化 Cursor 类的新实例。Initializes a new instance of the Cursor class.

属性

AutoScroll

获取或设置一个标志,该标志确定如果范围选择操作超出图表区域的边界,是否会发生滚动。Gets or sets a flag that determines whether scrolling will occur if a range selection operation extends beyond a boundary of the chart area.

AxisType

获取或设置光标附加到的轴的类型。Gets or sets the type of axis that the cursor is attached to.

Interval

获取或设置光标间隔。Gets or sets the cursor interval.

IntervalOffset

获取或设置间隔偏移量,该偏移量影响当用户对光标和范围选择进行设置时可以绘制它们的位置。Gets or sets the interval offset, which affects where the cursor and range selection can be drawn when they are set by a user.

IntervalOffsetType

获取或设置轴的光标和所选范围的间隔偏移量类型。Gets or sets the interval offset type of a cursor and selected range for an axis.

IntervalType

获取或设置轴的光标和所选范围的间隔类型。Gets or sets the interval type for the cursor and selected range of an axis.

IsUserEnabled

获取或设置一个标志,该标志启用或禁用光标用户界面。Gets or sets a flag that enables or disables the cursor user interface.

IsUserSelectionEnabled

获取或设置一个标志,该标志启用或禁用范围选择用户界面。Gets or sets a flag that enables or disables the range selection user interface.

LineColor

获取或设置光标线条颜色。Gets or sets the cursor line color.

LineDashStyle

获取或设置光标线条的样式。Gets or sets the style of the cursor line.

LineWidth

获取或设置光标的线条宽度(以像素为单位)。Gets or sets the line width, in pixels, of a cursor.

Position

获取或设置光标位置。Gets or sets the position of a cursor.

SelectionColor

获取或设置突出显示某一范围数据的半透明颜色。Gets or sets a semi-transparent color that highlights a range of data.

SelectionEnd

获取或设置范围选择的结束位置。Gets or sets the end position of a range selection.

SelectionStart

获取或设置光标所选范围的起始位置。Gets or sets the start position of a cursor's selected range.

方法

Dispose()

执行应用程序定义的释放或重置非托管资源的任务。Performs application-defined tasks that free, release, or reset unmanaged resources.

Dispose(Boolean)

释放非托管资源和(可选)托管资源。Releases unmanaged and, optionally, managed resources.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
SetCursorPixelPosition(PointF, Boolean)

在指定位置显示光标。Displays a cursor at the specified position. 以像素度量。Measured in pixels.

SetCursorPosition(Double)

设置图表区域中指定轴值处的光标位置。Sets the position of a cursor within a chart area at the specified axis value.

SetSelectionPixelPosition(PointF, PointF, Boolean)

设置范围选择的起始位置和结束位置。Sets the start and end positions of a range selection.

SetSelectionPosition(Double, Double)

设置图表区域中指定轴值处的所选范围位置。Sets the position of a selected range within a chart area at the specified axis values.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于