static SortDirectionAdorner() { GradientStopCollection stops = new GradientStopCollection(2); stops.Insert(0, new GradientStop(SystemColors.ActiveCaptionColor, 0)); stops.Insert(1, new GradientStop(SystemColors.ControlColor, 1)); ArrowBrush = new LinearGradientBrush(stops, new Point(.5, 1.0), new Point(.5, 0.0)); DecendingArrow = Geometry.Parse("M 5,5 L 9,13 L 13,5"); AscendingArrow = Geometry.Parse("M 5,13 L 9,5 L 13,13"); }
static SortDirectionAdorner() { GradientStopCollection stops = new GradientStopCollection(2); stops.Insert(0, new GradientStop(SystemColors.ActiveCaptionColor, 0)); stops.Insert(1, new GradientStop(SystemColors.ControlColor, 1)); ArrowBrush = new LinearGradientBrush(stops, new Point(.5, 1.0), new Point(.5, 0.0)); DecendingArrow = Geometry.Parse("M 5,5 L 9,13 L 13,5"); AscendingArrow = Geometry.Parse("M 5,13 L 9,5 L 13,13"); } /* constructor SortDirectionAdorner */
static HeatMapGenerator() { HeatMap = GradientsSmoothFromColors(0.5, Colors.DodgerBlue, Colors.Cyan, Colors.Lime, Colors.Yellow, Colors.Red); HeatMap2 = GradientsSmoothFromColors(0.5, Colors.Black, Colors.Cyan, Colors.Lime, Colors.Yellow, Colors.Red); HeatMap2.Insert(1, new GradientStop(Colors.DodgerBlue, 0.01)); }
static HeatMapGenerator() { HeatMap = GradientsSmoothFromColors(0.5, Colors.DodgerBlue, Colors.Cyan, Colors.Lime, Colors.Yellow, Colors.Red); HeatMap2 = GradientsSmoothFromColors(0.5, Colors.Black, Colors.Cyan, Colors.Lime, Colors.Yellow, Colors.Red); HeatMap2.Insert(1, new GradientStop(Colors.DodgerBlue, 0.01)); HeatMap3 = new GradientStopCollection(); HeatMap3.Add(new GradientStop(Colors.Lime, 0)); HeatMap3.Add(new GradientStop(Colors.Lime, 0.8)); HeatMap3.Add(new GradientStop(Colors.Yellow, 0.9)); HeatMap3.Add(new GradientStop(Colors.Yellow, 0.98)); HeatMap3.Add(new GradientStop(Colors.Red, 1.0)); }
public void setColors(Canvas linearGradient, List <string> colors) { GradientStopCollection stops = _linearGradient.GradientStops; for (int i = 0; i < colors.Count; i++) { GradientStop stop = i < stops.Count ? stops[i] : new GradientStop(); stop.Color = ColorHelpers.Parse(Convert.ToUInt32(colors[i])); if (i < stops.Count) { stops.RemoveAt(i); } stops.Insert(i, stop); } _linearGradient.GradientStops = stops; }
public void setLocations(Canvas linearGradient, List <float> locations) { if (locations != null) { GradientStopCollection stops = _linearGradient.GradientStops; for (int i = 0; i < locations.Count; i++) { GradientStop stop = i < stops.Count ? stops[i] : new GradientStop(); stop.Offset = locations[i]; if (i < stops.Count) { stops.RemoveAt(i); } stops.Insert(i, stop); } _linearGradient.GradientStops = stops; } }