Parent: Object
Represents a component line in a chart drawing object. A DrawingObjectLine is defined by two Handle instances and provides properties that control its appearance, visibility, extension, and interaction behavior.
Creates a new DrawingObjectLine associated with the DrawingObjectBase instance specified in parent. The line is initially visible.
Controls whether the ExtendLeft property of this line is changed when the user changes the "Extend Left" Parameter of the Parent drawing object. The default value is true.
Controls whether the ExtendRight property of this line is changed when the user changes the "Extend Right" Parameter of the Parent drawing object. The default value is true.
Controls whether the LineStyle property of this line is changed when the user changes the "Line Style" Parameter of the Parent drawing object. The default value is true.
Specifies an optional color for the line. The default value is WLColor.Empty. Drawing objects can use this property to allow individual component lines to be rendered in a different color than the parent drawing object.
Returns true if either ExtendLeft or ExtendRight is true.
Controls whether the line extends to the left beyond its LeftHandle when rendered.
Controls whether the line extends to the right beyond its RightHandle when rendered.
Ensures that Handle1 occurs before Handle2 on the chart. If the Index of Handle1 is greater than the Index of Handle2, the DateTime and Value properties of the two handles are swapped.
Determines whether the line is visible within a specified range of chart bar indices, taking the ExtendLeft and ExtendRight settings into account. The first version returns true if the line, or an extended portion of it, intersects the range from startX through endX. The second version determines whether the line extends through the single bar index specified in x.
Controls whether the user can drag the line with the mouse.
Returns true if the mouse position specified in pt is considered to be over the line. The method returns false if IsDraggable is false. For non-vertical lines, a mouse position within approximately 5 pixels of the line is considered to be over it.
Returns true if Handle1 and Handle2 have the same DateTime.
Controls whether the line should be rendered. A newly constructed DrawingObjectLine is visible by default.
Returns the Handle that occurs on the left side of the line, based on the handles' Index values. If both handles have the same Index, Handle1 is returned.
Specifies the LineStyle used when rendering the line. The default value is LineStyle.Solid.
Specifies the width of the line. The default value is 2.
Returns the DrawingObjectBase instance that this line belongs to.
Restores the state of the DrawingObjectLine from the persisted string specified in s. The persisted handle references are resolved against the Handles collection of the Parent drawing object.
Returns a string containing the persisted state of the DrawingObjectLine, including its handles, drag state, line style, extension settings, visibility, color, and line width.
Renders the line to the specified DrawingContext (dc) using the specified pen. If ExtendLeft or ExtendRight is enabled, the line is extended toward the corresponding edge of the chart. The line is not rendered if IsVisible is false.
Returns the Handle that occurs on the right side of the line, based on the handles' Index values. If both handles have the same Index, Handle2 is returned.
Returns the y-axis value at which the line intersects the DateTime specified in dt. Returns Double.NaN if the required chart coordinate conversion cannot be performed. For a vertical line, the method returns the Value of Handle1.
Returns the projected y-axis value of the line at the next streaming bar position. This is calculated by extending the slope defined by Handle1 and Handle2 one bar beyond the chart's current EndIndex. Returns Double.NaN if the value cannot be calculated.