Skip to content
In this project you will see how to use the directionPointStyle of lineStyle to rotate features by values. This ApplyDirectionPointStyleForLineStyle sample supports ThinkGeo and higher and will show you how to create a WPF application using ThinkGeo UI WPF components.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Apply directionPointStyle for lineStyle for Wpf


The ThinkGeo WPF ApplyDirectionPointStyleForLineStyle sample will guide you to draw lineStyle's direction Point on map. The direction Point can be an image or a glyph, it not only rotates the icon accross the angle of the road, but also provides a way to customize the rotation of the direction point. The arrows highlighted in the red circle in the following screenshot are customized based on the line's attributes. Please check out the source for detail. This sample supports ThinkGeo UI Wpf 12.0.17 and higher.

Please refer to Wiki for the details.


About the Code

// Set up the line style with white inner pen and black center pen. 
var lineStyle = new LineStyle(new GeoPen(GeoColors.Black, 16) { StartCap = DrawingLineCap.Round, EndCap = DrawingLineCap.Round }, new GeoPen(GeoColors.White, 13) { StartCap = DrawingLineCap.Round, EndCap = DrawingLineCap.Round });
// Set up the required column name for the style. We will customize the line style based on this column value. 
// Set up the style for Direction Point and set up the event for customization. 
lineStyle.DirectionPointStyle = new PointStyle(new GeoImage("AppData\\Arrow.png"));
lineStyle.DrawingDirectionPoint += LineStyle_DrawingPointStyle;
private void LineStyle_DrawingPointStyle(object sender, DrawingDirectionPointEventArgs e)
    // Customize the direction point for the line feature whose "FENAME" column equals to "Mo-Pac". 
    if (e.Line.ColumnValues["FENAME"] == "Mo-Pac")
        e.RotationAngle = 0;

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.