How many types of gradient brushes are available as LinearGradientBrush, SolidColorBrush? and when we create a GradientStop, how does the offset work?
LinearGradientBrush LGB = new LinearGradientBrush();
LGB.StartPoint = new Point(0, 0);
LGB.EndPoint = new Point(0, 1);
LGB.GradientStops.Add(new GradientStop(Color.FromRgb(255,251,255) , 0));
LGB.GradientStops.Add(new GradientStop(Color.FromRgb(206,207,222), 1));
LGB.GradientStops.Add(new GradientStop(Color.FromRgb(0, 247, 0), 2));
rect.Fill = LGB;
Why does the third βColor.FromRgb (0, 247, 0)β not reflect?
Please suggest where am I mistaken?
source
share