/// <summary> 绘制图例 </summary> void BindLegend(ICurveEntitySource item) { LineLegendItem l = new LineLegendItem(item); Style s = this.FindResource("DefaultLineLegendItem") as Style; l.Style = s; this.legend.AddLegendItem(l); }
public LineLegendItem(ICurveEntitySource c) { _curve = c; this.Color = c.Color; this.Text = c.Text; this.Marker = c.Marker?.Clone(); this.Checked += LineLegendItem_Checked; this.Unchecked += LineLegendItem_Checked; }