GridLinesPanel
StockSharp.Xaml.Charting.Visuals.Axes
提供一个面板来绘制 & ##UltrachartSurface+##格线区域的背景。 由于 v2.0 此面板不再绘制格线, 这些面板将推迟到 & ##RenderSurfaceBase+## # 后面 。
继承自: ContentControl
实现: IGridLinesPanel
构造函数
GridLinesPanel
public GridLinesPanel()
gridLinesPanel = GridLinesPanel()
初始化了 & ##GridLinesPanel+# 类的新实例 。
属性
EventAggregator
public IEventAggregator EventAggregator { set; }
gridLinesPanel.EventAggregator = value
设置整个 Ultrachart 中使用的事件聚合实例
方法
AddLine
public void AddLine(XyDirection xyDirection, Line line)
gridLinesPanel.AddLine(xyDirection, line)
在 XyDirection 中添加一行到面板
- xyDirection
- XDirection 添加了 X轴网格线
- line
- 添加的行
Clear
public void Clear(XyDirection xyDirection)
gridLinesPanel.Clear(xyDirection)
清除网格线向特定方向
- xyDirection
- XDirection)清除了 X轴网格线
GenerateElement
public Line GenerateElement(int lineId, XyDirection xyDirection, Style lineStyle)
result = gridLinesPanel.GenerateElement(lineId, xyDirection, lineStyle)
生成并添加 GridLinesPanel 的行元素。 将行的方向和样式应用到行中以及 Id, 以便它们可以被重新使用(拼接) 。
- lineId
- 线条 Id
- xyDirection
- 方向, X 或 Y
- lineStyle
- 应用到行的样式
返回值: 线例, 已添加到 GridLinesPanel 中
RemoveElementsAfter
public void RemoveElementsAfter(XyDirection xyDirection, int index)
gridLinesPanel.RemoveElementsAfter(xyDirection, index)
删除指定索引后的所有行例。 当行数从一行重排到下一行时, 重绘到% UltrachartSurface +% 时, 将使用此方法 。
- xyDirection
- 清除方向, X 或 Y
- index
- 后删除的索引( 包含)