using Core.Common.Controls.TreeView; using Core.Components.Charting.Data; using Core.Components.OxyPlot.Forms; namespace Core.Plugins.OxyPlot.Legend { /// /// This class describes the view for showing and configuring the data of a . /// public class LegendTreeView : TreeView { /// /// Creates a new instance of . /// public LegendTreeView() { RegisterNodePresenter(new LineDataNodePresenter()); RegisterNodePresenter(new PointDataNodePresenter()); RegisterNodePresenter(new AreaDataNodePresenter()); RegisterNodePresenter(new ChartNodePresenter()); } /// /// Gets or sets the that is used as the source of the . /// public ChartData ChartData { get { return (ChartData) Data; } set { Data = value; if (value == null) { Nodes.Clear(); } } } protected override void Dispose(bool disposing) { Data = null; base.Dispose(disposing); } } }