Select Items on map with MVVM framework

3 posts, 0 answers
  1. Robert Haydock
    Robert Haydock avatar
    2 posts
    Member since:
    Aug 2019

    Posted 08 Oct Link to this post

    I have looked over the examples for selecting items from the Visualization layer, specifically "Visualization Layer Items Selection" but they all seem to require adding event handlers in the code behind. Is there a way to select items without having to add an event handler in the code behind and keep all the logic in the viewmodel? Normally I just use data binding with the ItemsSelected property but that doesn't seem to be working.
  2. Dinko
    Admin
    Dinko avatar
    956 posts

    Posted 11 Oct Link to this post

    Hello Robert Haydock,

    You can consider using our EventToCommandBehavior behavior. It allows you to bind an event to a command from your ViewModel. This way you can create your logic in the ViewModel. I have modified the VisualizationLayerItemsSelection SDK demo from our GitHub repository to demonstrate how you can achieve this.

    I hope this approach will work for you.

    Regards,
    Dinko
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Robert Haydock
    Robert Haydock avatar
    2 posts
    Member since:
    Aug 2019

    Posted 11 Oct in reply to Dinko Link to this post

    Thanks Dinko! I think that should work perfectly.
Back to Top