Exemple #1
0
        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);
            }
        }
Exemple #2
0
 set => SetValue(GradientStopsProperty, value);