This is a migrated thread and some comments may be shown as answers.

Access DataContext from ShapeDataVirtualizer

1 Answer 80 Views
Map
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 2
Andrew asked on 10 Feb 2015, 02:04 PM
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

Sort by
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.

 
Tags
Map
Asked by
Andrew
Top achievements
Rank 2
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or