Cursor 類別

定義

表示沿著軸定義位置的水平或垂直線。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 類別所實,這會公開為 ChartArea 物件的 CursorX 和 @no__t 2 屬性。Cursors and range selections are both implemented by the Cursor class, which is exposed as the CursorX and CursorY properties of the ChartArea object. @No__t-0 物件適用于圖表區域的 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 類別外找到的唯一資料指標和範圍選取功能,就是與根 Chart 物件中的資料指標和範圍選取相關的事件。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.

建構函式

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

執行會釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源之應用程式定義的工作。Performs application-defined tasks that free, release, or reset unmanaged resources.

Dispose(Boolean)

釋放 Unmanaged 和 Managed 資源 (後者為選擇性釋放)。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 的淺層複本 (Shallow Copy)。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)

適用於