void RemoveDataPoint(DataSeries ds, DesignerDataPoint dp)
        {
            var array = ds.DataPoints.Where((d) => d.Name == dp.Name);

            //TODO 是否内存泄漏
            foreach (IDataPoint idp in array)
            {
                ds.DataPoints.Remove(idp);
            }
        }
        void AddDataPoint(DataSeries ds, DesignerDataPoint dp)
        {
            DataPoint newDp = new DataPoint();

            newDp.Uid  = dp.ID.ToString();
            newDp.Name = dp.Name;
            newDp.SetBinding(DataPoint.AxisXLabelProperty, new Binding("AxisXLabel")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.BorderColorProperty, new Binding("LabelBorder.BorderBrush")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.BorderStyleProperty, new Binding("BorderStyle")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.BorderThicknessProperty, new Binding("LabelBorder.BorderThickness")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.ColorProperty, new Binding("Color")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.EnabledProperty, new Binding("Enabled")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelAngleProperty, new Binding("LabelAngle")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelBackgroundProperty, new Binding("LabelBackground")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelEnabledProperty, new Binding("LabelEnabled")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelFontColorProperty, new Binding("LabelFont.FontColor")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelFontFamilyProperty, new Binding("LabelFont.FontFamily")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelFontSizeProperty, new Binding("LabelFont.FontSize")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelFontStyleProperty, new Binding("LabelFont.FontStyle")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelFontWeightProperty, new Binding("LabelFont.FontWeight")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelLineColorProperty, new Binding("LabelLineColor")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelLineEnabledProperty, new Binding("LabelLineEnabled")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelLineStyleProperty, new Binding("LabelLineStyle")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelLineThicknessProperty, new Binding("LabelLineThickness")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelStyleProperty, new Binding("LabelStyle")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LabelTextProperty, new Binding("LabelText")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LegendMarkerColorProperty, new Binding("LegendMarkerColor")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LegendMarkerTypeProperty, new Binding("LegendMarkerType")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LegendTextProperty, new Binding("LegendText")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.LightingEnabledProperty, new Binding("LightingEnabled")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerBorderColorProperty, new Binding("MarkerBorderColor")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerBorderThicknessProperty, new Binding("MarkerBorderThickness")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerColorProperty, new Binding("MarkerColor")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerEnabledProperty, new Binding("MarkerEnabled")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerScaleProperty, new Binding("MarkerScale")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerSizeProperty, new Binding("MarkerSize")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.MarkerTypeProperty, new Binding("MarkerType")
            {
                Source = dp, Mode = BindingMode.OneWay
            });

            newDp.SetBinding(DataPoint.OpacityProperty, new Binding("DataPointOpacity")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.RadiusXProperty, new Binding("RadiusX")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.RadiusYProperty, new Binding("RadiusY")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.ShadowEnabledProperty, new Binding("ShadowEnabled")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.ShowInLegendProperty, new Binding("ShowInLegend")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.StickColorProperty, new Binding("StickColor")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.XValueProperty, new Binding("XValue")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.YValueProperty, new Binding("YValue")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.YValuesProperty, new Binding("YValues")
            {
                Source = dp, Mode = BindingMode.OneWay
            });
            newDp.SetBinding(DataPoint.ZValueProperty, new Binding("ZValue")
            {
                Source = dp, Mode = BindingMode.OneWay
            });

            if (ds.DataPoints == null)
            {
                ds.DataPoints = new DataPointCollection();
            }
            ds.DataPoints.Add(newDp);
        }