I'm using virtualization in a RadMap. How can my ShapeDataVirtualizer class (based on IMapItemsVirtualizationSource) get to the DataContext object which is set on the parent Window?
Andrew
1 Answer, 1 is accepted
0
Pavel R. Pavlov
Telerik team
answered on 13 Feb 2015, 10:12 AM
Hello Andrew,
I cannot be sure about your implementation, this is why I will try to explain how your requirement can be achieved based on our Map Shapes Virtualization article. If you take a look at the sample implementation of the MapItemsRequest() method inside ShapeVirtualization class, you will see how a reference to the Layer is saved. Please note that the DataContext of your MainWindow should propagate to the RadMap and also to the VisualizationLayer.
Please give this approach a try and let us now if you need any further assistance.
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.