public void AddChild(object o) { GradientStopCollection gsc = o as GradientStopCollection; GradientStop gs = o as GradientStop; if (gsc != null) { GradientStops.Dispose(); gsc.SetParent(this); GradientStopsProperty.SetValue(gsc); } else if (gs != null) { GradientStops.Add(gs); } else if (o != null) { throw new XamlParserException("Objects of type {0} cannot be added to {1}", o.GetType().Name, GetType().Name); } }
set => SetValue(GradientStopsProperty, value);