I’ve problems binding an ObservableCollection<ISpatial> SpatialPolyItemCollection as Source in SqlGeospatialDataReader.
Nothing shows up in the map.
ISpatial is an Interface for a class Spatial containing Wkt to represent the polygon.
<telerik:InformationLayer x:Name="spatialPolyLayer">
<telerik:InformationLayer.Reader>
<telerik:SqlGeospatialDataReader x:Name="GeoReader" PreviewReadCompleted="PreviewReadCompleted"
Source="{Binding SpatialPolyItemCollection}" GeospatialPropertyName="Wkt" ToolTipFormat="Navn">
</telerik:SqlGeospatialDataReader>
</telerik:InformationLayer.Reader>
</telerik:InformationLayer>
I can make it work in code behind by adding GeoReader.Source = SpatialPolyItemCollection.
Any Ideas how I can make this binding work without the code behind line?
I know that my collection is valid because it works fine if I use the same collection inside a GridView
<telerik:RadGridView x:Name="gridGeometriView" SelectionMode="Extended"
ItemsSource="{Binding SpatialPolyItemCollection}" FrozenColumnCount="2" SelectionChanged="GridViewSelectionChanged"/>