示例#1
0
        /// <summary>
        /// Build the UI element hierarchy for the chart control, for the current chart type.
        /// </summary>
        public override IUIElement Build()
        {
            switch (Control.ChartType)
            {
            case ChartType.BarChart:
                _chart = new BarChart(Control);
                break;

            case ChartType.PointChart:
                _chart = new PointChart(Control);
                break;

            case ChartType.RadarChart:
                _chart = new RadarChart(Control);
                break;
            }

            return(_chart.Build());
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Microcharts.InvalidatedWeakEventHandler`1"/> class.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="target">The target.</param>
 /// <param name="targetMethod">The target method.</param>
 public InvalidatedWeakEventHandler(ChartBase source, TTarget target, Action <TTarget> targetMethod)
 {
     this.sourceReference = new WeakReference <ChartBase>(source);
     this.targetReference = new WeakReference <TTarget>(target);
     this.targetMethod    = targetMethod;
 }