Skip to content
In this project you will see how to use the ClassBreakStyle to group and render features by values. ClassBreakStyle is a useful technique as it allows you to group various features by the specified values, then applies differently style to the feature groups.
C#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ClassBreakStyle
.gitignore
ClassBreakStyle.sln
README.md
Screenshot.png

README.md

Class Break Style Sample for Wpf

Description

In this project you will see how to use the ClassBreakStyle to group and render features by values. ClassBreakStyle is a useful technique as it allows you to group various features by the specified values, then applies differently style to the feature groups.

Please refer to Wiki for the details.

Screenshot

About the Code

Use a ClassBreakStyle to colorize each state differently depending on the range into which its population falls. This value is found in the states ShapeFile DBF in the column named "POP1990".

       
ClassBreakStyle statesStyle = new ClassBreakStyle("POP1990");
statesStyle.ClassBreaks.Add(
    new ClassBreak(value: 0, areaStyle: AreaStyles.CreateSimpleAreaStyle(
        fillBrushColor: GeoColors.LightGray,
        outlinePenColor: GeoColors.DarkGray,
        outlinePenWidth: 1)
    )
);
statesStyle.ClassBreaks.Add(
    new ClassBreak(value: 1000000, areaStyle: AreaStyles.CreateSimpleAreaStyle(
        fillBrushColor: GeoColors.LightBlue,
        outlinePenColor: GeoColors.CornflowerBlue,
        outlinePenWidth: 1)
    )
);
statesStyle.ClassBreaks.Add(
    new ClassBreak(value: 3500000, areaStyle: AreaStyles.CreateSimpleAreaStyle(
        fillBrushColor: GeoColors.SkyBlue,
        outlinePenColor: GeoColors.DeepSkyBlue,
        outlinePenWidth: 1)
    )
);
// Add stateStyle to the statesLayer and apply the style to all zoom levels.
statesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(statesStyle);
statesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

Getting Help

ThinkGeo Desktop for Wpf Wiki Resources

ThinkGeo Desktop for Wpf Product Description

ThinkGeo Community Site

ThinkGeo Web Site

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

You can’t perform that action at this time.