Cursor.Position 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定游標的位置。
public:
property double Position { double get(); void set(double value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDateNanValueConverter))]
public double Position { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.DataVisualization.Charting.DoubleDateNanValueConverter))>]
member this.Position : double with get, set
Public Property Position As Double
屬性值
游標的位置。
- 屬性
備註
此特性可用於取得游標的位置,並可程式化設定游標位置。
位置以游標所屬軸的值來衡量,該軸由 AxisType 性質決定。 例如,若游標位於主 X 軸,將此屬性設為 2000 年 1 月 1 日,則 X 軸游標會繪製在 2000 年 1 月 1 日沿軸的位置。 若該軸值不存在,游標將不被顯示。
請注意,如果你設定了這個屬性, Interval 和 IntervalOffset 屬性將不會影響;也就是說,游標會顯示在這個指定位置。
設定此物業不會提升事件CursorPositionChanging。CursorPositionChanged
或者,也可以使用 and SetCursorPositionSetCursorPixelPosition 方法來設定游標。
要程式化移除游標,請使用此特性將游標的位置設定為 NaN。