How can I control the placement of a Symbol's captions?
Currently with a 'bubble' symbol the caption is appearing over the symbol I want it to display above by default.
Further for some of my applications I want to one piece a caption above the symbol and a value below the symbol, is this possible?
Hi,
Just checking if the latest reply helped you out and if you require any further assistance on the matter.
Sincerely,DimiDeveloper Support Engineer, MCPD Infragistics, Inc.www.infragistics.com/support
Actually, I was attempting to do the same thing in moving the caption placement to underneath the symbol. I'm getting stuck because my symbols are being dynamically created in the layer and so the captions are set in code behind. Is there a way to manipulate its placement at that point or can it only be done in the xaml as used in the examples? TIA
JP
Hi Milana,
Yep, that was my problem. I wasn't applying the value template correctly in the code behind. Once I added that, it worked as expected. Thanks for your help!
Hi JP,You can also define the DataTemplate, you want to use, as a resource and then refer to it from Code Behind. A sample approach is the following:
<Grid x:Name="LayoutRoot"> <Grid.Resources> <DataTemplate x:Key="placeSymb"> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <Image Source="Images/pizza.jpg" Height="50" Width="50" Grid.Row="0"/> <TextBlock Text="{Binding Name}" Grid.Row="1"/> </Grid> </DataTemplate> </Grid.Resources> <igMap:XamMap x:Name="xamMap1"> <igMap:XamMap.Layers> <igMap:MapLayer x:Name="MapLayer" IsAutoWorldRect="True" Imported="MapLayer_Imported"> <igMap:MapLayer.Reader> <igMap:ShapeFileReader Uri="/../../Shapefiles/world/world" DataMapping="Name=CNTRY_NAME; Value=POP_CNTRY"/> </igMap:MapLayer.Reader> </igMap:MapLayer> </igMap:XamMap.Layers> </igMap:XamMap> </Grid> private void MapLayer_Imported(object sender, Infragistics.Controls.Maps.MapLayerImportEventArgs e) { if (e.Action == MapLayerImportAction.End) { xamMap1.Layers["MapLayer"].ValueTemplate = LayoutRoot.Resources["placeSymb"] as DataTemplate; } } Hope that helps, Milana Zhileva