IGridLinesPanel

StockSharp.Xaml.Charting.Visuals.Axes

Defines the interface to the GridLinesPanel, a canvas control which displays grid lines behind the UltrachartSurface

Properties

BorderThickness
public Thickness BorderThickness { get; }
value = iGridLinesPanel.BorderThickness

Gets the thickness of any border applied to the panel

Height
public int Height { get; }
value = iGridLinesPanel.Height

Gets the height of the panel in pixels

Width
public int Width { get; }
value = iGridLinesPanel.Width

Gets the width of the panel in pixels

Methods

AddLine
public void AddLine(XyDirection xyDirection, Line line)
iGridLinesPanel.AddLine(xyDirection, line)

Adds a line to the panel in the specific XyDirection

xyDirection
The XyDirection to clear in, e.g. XDirection adds an X-Axis gridline
line
The line to add
Clear
public void Clear(XyDirection xyDirection)
iGridLinesPanel.Clear(xyDirection)

Clears the grid lines in a specific direction

xyDirection
The XyDirection to clear in, e.g. XDirection clears the X-Axis gridlines
GenerateElement
public Line GenerateElement(int lineId, XyDirection xyDirection, Style lineStyle)
result = iGridLinesPanel.GenerateElement(lineId, xyDirection, lineStyle)

Generates and adds a Line element to the GridLinesPanel. Applies the direction and style to the line as well as Id so they may be re-used (pooled)

lineId
The line Id
xyDirection
The direction, X or Y
lineStyle
The style to apply to the line

Returns: The Line instance, which has been added to the GridLinesPanel

RemoveElementsAfter
public void RemoveElementsAfter(XyDirection xyDirection, int index)
iGridLinesPanel.RemoveElementsAfter(xyDirection, index)

Removes all Line instances after the specified index. This method is used when re-drawing the UltrachartSurface when the number of lines has reduced from one redraw to the next.

xyDirection
The direction to clear, X or Y
index
The index to remove after (inclusive)