void MeasureLines(Windows.Foundation.Size availableSize) { LineSparklineViewInfo sparklineViewInfo = base.SparklineViewInfo as LineSparklineViewInfo; if (sparklineViewInfo != null) { sparklineViewInfo.MeasurelinePos(availableSize); } if ((sparklineViewInfo.LinePos != null) && (sparklineViewInfo.LinePos.Count > 0)) { if (this.lines == null) { this.lines = new List <Windows.UI.Xaml.Shapes.Line>(); } for (int i = 0; i < sparklineViewInfo.LinePos.Count; i++) { Windows.UI.Xaml.Shapes.Line line; Windows.Foundation.Point p1; Windows.Foundation.Point p2; Tuple <Windows.Foundation.Point, Windows.Foundation.Point> tuple = sparklineViewInfo.LinePos[i]; if (tuple != null) { line = null; if (i >= this.lines.Count) { line = new Windows.UI.Xaml.Shapes.Line(); line.StrokeStartLineCap = PenLineCap.Round; line.StrokeEndLineCap = PenLineCap.Round; line.Stroke = new SolidColorBrush(this.SparklineInfo.Setting.SeriesColor); double lineWeight = this.GetLineWeight(); line.StrokeThickness = lineWeight; this.lines.Add(line); } else { line = this.lines[i]; } p1 = tuple.Item1; p2 = tuple.Item2; line.X1 = p1.X; line.X2 = p2.X; line.Y1 = p1.Y; line.Y2 = p2.Y; } } } }
/// <summary> /// Initializes a new instance of the <see cref="T:Dt.Cells.Data.PdfLineSparklineView" /> class. /// </summary> /// <param name="viewInfo">The view info.</param> public PdfLineSparklineView(LineSparklineViewInfo viewInfo) : base(viewInfo) { }