I have this GeographicShapeSeries component and I would like the add a TextBlock to the DataTemplate but I'm getting a cast exception when I try
GeographicShapeSeries series = new GeographicShapeSeries() { ItemsSource = data, MarkerTemplate = new DataTemplate(), ShapeMemberPath = "Points", Brush = brush, BorderBrush = Brushes.MediumBlue, ToolTip = "DæknigsGrad " + s.properties.maxDaekningTal + " PostBy " + s.properties.POSTBYNAVN + " Post nr " + s.properties.POSTNR_TXT
};
Hello Thomas,
From your code-snippet, I am little unsure why you are seeing a cast exception, but I am attaching a sample project to demonstrate how you can modify the MarkerTemplate of a GeographicShapeSeries in the Infragistics for WPF XamGeographicMap. I hope this helps you.
Please note that in the sample, the .shp and .dbf files are using an absolute URI as that is what is expected for the ShapeDataSource, and so you will need to change them to the file paths on your machine accordingly.
Please let me know if you have any other questions or concerns on this matter.
XamGeoMapMarkerTemplateDemo.zip
Hi Andrew
How can set the content property in the textblok