Cursor.Position Propriedade
Definição
Obtém ou define a posição de um cursor.Gets or sets the position of a cursor.
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
Valor da propriedade
A posição de um cursor.The position of a cursor.
- Atributos
Comentários
Essa propriedade pode ser usada para obter a posição de um cursor, bem como para definir a posição do cursor de forma programática.This property can be used to get the position of a cursor, as well as to programmatically set the cursor position.
A posição é medida como um valor do eixo ao qual o cursor pertence, que é determinado pela AxisType propriedade.The position is measured as a value of the axis that the cursor belongs to, which is determined by the AxisType property. Por exemplo, se o cursor pertencer ao eixo X primário, a definição dessa propriedade como um valor de 1º de janeiro de 2000 fará com que o cursor do eixo X seja desenhado na posição 1º de janeiro de 2000 ao longo do eixo.For example, if the cursor belongs to the primary X axis, then setting this property to a value of January 1, 2000 will result in the X-axis cursor being drawn at the January 1, 2000 position along the axis. Se esse valor de eixo não existir, o cursor não será exibido.If this axis value does not exist, the cursor will not be displayed.
Observe que, se você definir essa propriedade, Interval as IntervalOffset Propriedades e não terão efeito; ou seja, o cursor será exibido nesse local especificado.Note that if you set this property, the Interval and IntervalOffset properties will have no effect; that is, the cursor will be displayed at this specified location.
A definição dessa propriedade não gerará CursorPositionChanged os CursorPositionChanging eventos ou.Setting this property will not raise the CursorPositionChanged or CursorPositionChanging events.
Como alternativa, os SetCursorPosition SetCursorPixelPosition métodos e podem ser usados para definir o cursor.Alternatively, the SetCursorPosition and SetCursorPixelPosition methods can be used to set the cursor.
Para remover programaticamente um cursor, use essa propriedade para definir a posição do cursor como NaN .To programmatically remove a cursor, use this property to set the position of the cursor to NaN.