Search Framework:
Handle
Namespace: WealthLab.ChartWPF
Parent: Object

The Handle class represents a draggable handle belonging to a chart drawing object. Handles define points used by DrawingObjectBase-derived objects and can typically be moved by the user with the mouse.

Constructors
Handle
public Handle(DrawingObjectBase parent)

Creates a new Handle associated with the DrawingObjectBase instance specified in parent. The Handle is visible and draggable by default.



Members
Bars
public BarHistory Bars

Returns the BarHistory associated with the Handle's Parent drawing object.


DateTime
public DateTime DateTime

Gets or sets the date/time coordinate of the Handle within its source historical data.


Index
public int Index

Gets or sets the BarHistory index associated with the Handle. The getter determines the index from DateTime and returns -1 if the BarHistory is empty, or if the Handle's DateTime falls outside the current BarHistory range. Assigning this property changes DateTime to the DateTime of the specified bar index. If Bars is null or the supplied index is beyond the end of the BarHistory, the assignment is ignored.


IsDraggable
public bool IsDraggable

Controls whether the user can drag the Handle with the mouse. The default value is true.


Parent
public DrawingObjectBase Parent

Returns the DrawingObjectBase instance that this Handle belongs to.


Parse
public void Parse(string s)

Restores the Handle's persisted state from the string specified in s. The restored values include DateTime, Value, SnapToPrice, and Visible.


Persist
public string Persist()

Returns a string containing the persisted state of the Handle, including DateTime, Value, SnapToPrice, and Visible.


SnapToPrice
public bool SnapToPrice

Indicates whether the Handle should snap to an appropriate plotted value as the user moves it with the mouse. In the price pane, this typically means snapping to a nearby Open, High, Low, or Close value. Drawing objects plotted in other panes can use corresponding plotted TimeSeries values.


Value
public double Value

Gets or sets the y-axis value of the Handle.


Visible
public bool Visible

Controls whether the Handle is displayed when WealthLab renders the drawing object's handles. The default value is true.