Telerik UI for Windows 8 XAML

The MapShapeLayer has a ShapeLabelStyle property that is of D2DTextStyle type and defines the style of the labels.


The text is rendered using Direct2D (for superior performance), not XAML, and property set is different.

You can also change the foreground of the labels depending on the shape state via the Foreground property of the shape styles.


You will need to add the following namspace: xmlns:telerikDrawing="using:Telerik.UI.Drawing", that has definition of the D2DTextStyle and D2DShapeStyle classes.

Here is an example demonstrating how to style the labels of the shapes using the ShapeLabelStyle property of the containing MapShapeLayer.

XAML Copy imageCopy
<telerikMap:RadMap Width="500" Height="300">
        <telerikMap:MapShapeLayer ShapeLabelAttributeName="ADMIN_NAME">
                <telerikMap:ShapefileDataSource SourceUriString="ms-appx:///Data/global.shp" DataSourceUriString="ms-appx:///Data/global.dbf"/>
                <telerikDrawing:D2DTextStyle FontWeight="Bold" FontName="Arial" FontSize="17">
                        <telerikDrawing:D2DSolidColorBrush Color="#005663"/>

This is the result:

Rad Map-Styling-Label Style

See Also

Other Resources