Access DataContext from ShapeDataVirtualizer

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    27 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?

    Andrew
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 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.

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top