GridLinesPanel
Provides a panel to draw the background behind a UltrachartSurface gridlines area only. Since v2.0 this panel no longer draws gridlines, these are deferred to the RenderSurfaceBase
Inherits: ContentControl
Implements: IGridLinesPanel
Constructors
public GridLinesPanel()
gridLinesPanel = GridLinesPanel()
Initializes a new instance of the GridLinesPanel class.
Properties
public IEventAggregator EventAggregator { set; }
gridLinesPanel.EventAggregator = value
Sets the event aggregator instance used throughout Ultrachart
StockSharp#Xaml#Charting#Visuals#Axes#IGridLinesPanel#Height
Gets the height of the panel in pixels
StockSharp#Xaml#Charting#Visuals#Axes#IGridLinesPanel#Width
Gets the width of the panel in pixels
Methods
public void AddLine(XyDirection xyDirection, Line line)
gridLinesPanel.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
public void Clear(XyDirection xyDirection)
gridLinesPanel.Clear(xyDirection)
Clears the grid lines in a specific direction
- xyDirection
- The XyDirection to clear in, e.g. XDirection clears the X-Axis gridlines
public Line GenerateElement(int lineId, XyDirection xyDirection, Style lineStyle)
result = gridLinesPanel.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
public void RemoveElementsAfter(XyDirection xyDirection, int index)
gridLinesPanel.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)