Back to Devexpress

How to: Colorize Map Contours Using the Graph Colorizer

wpf-15344-controls-and-libraries-map-control-examples-vector-data-colorize-data-how-to-colorize-map-contours-using-the-graph-colorizer.md

latest1.5 KB
Original Source

How to: Colorize Map Contours Using the Graph Colorizer

  • Jun 07, 2019

This example demonstrates how to paint map contours loaded from a Shapefile ( Countries.shp ) using the graph colorizer.

To accomplish this task, create a graph colorizer (the GraphColorizer object) and assign it to the VectorLayer.Colorizer property.

And finally, specify the desired set of colors in the ColorCollection object that is accessed via the MapColorizer.Colors property.

xaml
<dxm:VectorLayer.Colorizer>
    <dxm:GraphColorizer>
        <dxm:GraphColorizer.Colors>
            <Color>#D6864E</Color>
            <Color>#C56450</Color>
            <Color>#BA4D51</Color>
            <Color>#5F8B95</Color>
            <Color>#799689</Color>
            <Color>#A2A875</Color>
        </dxm:GraphColorizer.Colors>
    </dxm:GraphColorizer>
</dxm:VectorLayer.Colorizer>

See Also

How to: Colorize Map Contours Using the Choropleth Colorizer

How to: Colorize Map Items Using the Key Color Colorizer