private InMemoryGridIsoLineLayer GetGridIsoLineLayer() { //Create a grid cell matrix based on the textboxes and the current extent CreateGridCellMatrix(); //Load the grid we just created into the GridIsoLineLayer using the number of breaks defines //on the screen Collection isoLineLevels = GridIsoLineLayer.GetIsoLineLevels(wellDepthPointData, Convert.ToInt32(txtGridIsoLineLevelCount.Text)); InMemoryGridIsoLineLayer isoLineLayer = new InMemoryGridIsoLineLayer(gridCellMatrix, isoLineLevels, 0, double.MaxValue, -9999, IsoLineType.ClosedLinesAsPolygons); //Create a series of colors from blue to red that we will use for the breaks Collection colors = GeoColor.GetColorsInQualityFamily(GeoColor.StandardColors.Blue, GeoColor.StandardColors.Red, isoLineLevels.Count, ColorWheelDirection.Clockwise); colors[0] = GeoColor.SimpleColors.Red; colors[1] = GeoColor.SimpleColors.Blue; colors[2] = GeoColor.SimpleColors.Green; colors[3] = GeoColor.StandardColors.Cyan; colors[4] = GeoColor.SimpleColors.Yellow; colors[5] = GeoColor.SimpleColors.Orange; //Setup a class break style based on the isoline levels and the colors ClassBreakStyle classBreakLineStyle = new ClassBreakStyle(isoLineLayer.DataValueColumnName); AreaStyle firstStyle = new AreaStyle(new GeoPen(colors[0], 3), new GeoSolidBrush(colors[0])); classBreakLineStyle.ClassBreaks.Add(new ClassBreak(double.MinValue, firstStyle)); for (int i = 0; i < colors.Count - 1; i++) { AreaStyle style = new AreaStyle(new GeoPen(colors[i + 1], 3), new GeoSolidBrush(colors[i + 1])); classBreakLineStyle.ClassBreaks.Add(new ClassBreak(isoLineLevels[i], style)); } isoLineLayer.CustomStyles.Add(classBreakLineStyle); //Create the text styles to label the lines TextStyle textStyle = TextStyles.CreateSimpleTextStyle(isoLineLayer.DataValueColumnName, "Arial", 8, DrawingFontStyles.Bold, GeoColor.StandardColors.Black, 0, 0); textStyle.HaloPen = new GeoPen(GeoColor.StandardColors.White, 2); textStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping; textStyle.SplineType = SplineType.StandardSplining; textStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels; textStyle.TextLineSegmentRatio = 9999999; textStyle.FittingLineInScreen = true; textStyle.SuppressPartialLabels = true; isoLineLayer.CustomStyles.Add(textStyle); return isoLineLayer; }