I'm attempting to bind a TextBlock in a CaptionTemplate but it's not working. If I just replace the binding with text it works fine.
Here is the code that does not display the caption:
If I replace
How do I bind this to a property?
Here is the code that does not display the caption:
<
telerik:InformationLayer
Name
=
"InformationLayerShape"
ItemsSource
=
"{Binding LayerShapes}"
>
<
telerik:InformationLayer.ItemTemplate
>
<
DataTemplate
>
<
views:MapPolygon
Points
=
"{Binding Locations}"
Fill
=
"#99FFFF00"
StrokeThickness
=
"4"
Visibility
=
"{Binding Visibility}"
CaptionLocation
=
"{Binding CaptionLocation}"
Opacity
=
".5"
>
<
views:WaterMapPolygon.CaptionTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding CaptionText}"
/>
</
DataTemplate
>
</
views:WaterMapPolygon.CaptionTemplate
>
</
views:MapPolygon
>
</
DataTemplate
>
</
telerik:InformationLayer.ItemTemplate
>
</
telerik:InformationLayer
>
If I replace
<
TextBlock
Text
=
"{Binding CaptionText}"
/>
with <
TextBlock
Text
=
"Display this caption."
/>
the text is displayed.How do I bind this to a property?