wpf-devexpress-dot-xpf-dot-map-dot-shapetitleoptions-76cc8c55.md
Gets or sets the template that defines the presentation of shape titles. This is a dependency property.
Namespace : DevExpress.Xpf.Map
Assembly : DevExpress.Xpf.Map.v25.2.dll
NuGet Package : DevExpress.Wpf.Map
public DataTemplate Template { get; set; }
Public Property Template As DataTemplate
| Type | Description |
|---|---|
| DataTemplate |
A DataTemplate object that defines an element’s presentation.
|
You can access this nested property as listed below:
| Object Type | Path to Template |
|---|---|
| MapShapeBase |
.TitleOptions .Template
| | VectorLayer |
.ShapeTitleOptions .Template
|
The following example demonstrates how to customize the map shape title.
To customize a title, do the following.
Create a ShapeTitleOptions object.
Specify the ShapeTitleOptions.Pattern and ShapeTitleOptions.Template properties.
Assign the object to the MapShapeBase.TitleOptions property of the map shape.
<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