Access DataContext from ShapeDataVirtualizer

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    25 posts
    Member since:
    Nov 2008

    Posted 10 Feb 2015 Link to this post

    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?

  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1165 posts

    Posted 13 Feb 2015 Link to this post

    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.

    Pavel R. Pavlov

    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.

  3. DevCraft R3 2016 release webinar banner
Back to Top