Esempio n. 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);
            }
        }
 public static GradientStopData FromGradientStop(GradientStop origin)
 {
   return new GradientStopData(origin.Color, origin.Offset);
 }
Esempio n. 3
0
 public static GradientStopData FromGradientStop(GradientStop origin)
 {
     return(new GradientStopData(origin.Color, origin.Offset));
 }