Back to Devexpress

How to: Customize the Appearance of a Vector Element's Title

wpf-12240-controls-and-libraries-map-control-examples-vector-data-customize-data-appearance-how-to-customize-the-appearance-of-a-vector-elements-title.md

latest2.9 KB
Original Source

How to: Customize the Appearance of a Vector Element's Title

  • Aug 01, 2019

The following example demonstrates how to customize the map shape title.

To customize a title, do the following.

xaml
<dxm:ShapeTitleOptions x:Key="titleOptions" 
                       Pattern="{}{Name}" Visible="True">
    <dxm:ShapeTitleOptions.Template>
        <DataTemplate>
            <TextBlock Text="{Binding Text}"
                       Foreground="Blue" Margin="0,0,0,20"/>
        </DataTemplate>
    </dxm:ShapeTitleOptions.Template>
</dxm:ShapeTitleOptions>
                    <dxm:MapDot Location="51.507222, -0.1275" Size="10" Fill="Red" 
                                TitleOptions="{StaticResource titleOptions}">
                        <dxm:MapDot.Attributes>
                            <dxm:MapItemAttribute Name="Name" Value="London"/>
                        </dxm:MapDot.Attributes>
                    </dxm:MapDot>

See Also

How to: Show Titles for Map Shapes

How to: Show Tooltips for Map Shapes

How to: Create a Map Item Attribute and Show its Value in the Map Tooltip

How to: Customize the Appearance of a Vector Element

How to: Show a Title for a Vector Element

How to: Customize the Appearance of a Map Pushpin

How to: Customize Animation of a Map Pushpin

How to: Provide Cylindrical Equal-Area Projections