public ColorScale() { InitializeComponent(); ColorStrip = new ColorStripView(); axis = new NumericAxisView(); SuspendLayout(); axis.ForeColor = Color2.Black; AutoScaleDimensions = new SizeF(6F, 13F); AutoScaleMode = AutoScaleMode.Font; colorStripControl = BasicControl.CreateControl(ColorStrip); colorStripControl.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left) | AnchorStyles.Right; colorStripControl.Location = new Point(0, 59); colorStripControl.Margin = new Padding(0); colorStripControl.Name = "colorStrip"; colorStripControl.Size = new Size(749, 31); Controls.Add(colorStripControl); BasicControl axisControl = BasicControl.CreateControl(axis); axisControl.Anchor = ((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Left) | AnchorStyles.Right; axisControl.ForeColor = Color.Black; axisControl.Location = new Point(0, 0); axisControl.Margin = new Padding(0); axisControl.Name = "axis"; axisControl.Size = new Size(749, 59); Controls.Add(axisControl); Name = "ColorScale"; Size = new Size(749, 90); ResumeLayout(false); ColorStrip.Arrow = Arrows.Second; ColorStrip.StartupColorMax = Color2.Red; ColorStrip.StartupColorMin = Color2.White; ColorStrip.StripWidth = 10; ColorStrip.Vertical = false; ColorStrip.Weight1 = 1F; ColorStrip.Weight2 = 0F; axis.Configurable = true; axis.IndicatorColor = Color2.Transparent; axis.IsLogarithmic = false; axis.LineWidth = 0.5F; axis.MajorTickLength = 6; axis.MajorTickLineWidth = 0.5F; axis.MinorTickLength = 3; axis.MinorTickLineWidth = 0.5F; axis.MouseMode = AxisMouseMode.Zoom; axis.Positioning = AxisPositioning.Top; axis.Reverse = false; axis.TotalMax = 1; axis.TotalMin = 0; axis.ZeroPoint = double.NaN; axis.ZoomMax = 1; axis.ZoomMin = 0; axis.ZoomType = AxisZoomType.Zoom; ColorStrip.OnColorChange += UpdateAxis; axis.OnZoomChange += UpdateColor; }