Style selected shape

3 posts, 0 answers
  1. mc
    mc avatar
    4 posts
    Member since:
    Jul 2019

    Posted 02 Aug 2019 Link to this post

    Hi Progress,

    I have a read-only RadMap (ie no selection changing by mouse/touch) where the selected shape is chosen following selection of an item in a ListView.  I have configured a MapShapeStyleSelector as per the instructions in [ShapeStyleSelector](

    I originally coded the app using a main Page for the ListView and a separate Page for the map: when the user changed the selection in the Main Page and navigated back to the Page with the map, the newly selected shape was Styled according to the MapShapeLayer's ShapeStyleSelector.

    I have since changed to use only one Page, and the ListView is now contained in a RadSideDrawer on the page.  The map correctly styles the shape when it is first chosen.  However, when the user opens the side-drawer and selects a different item, while the map still correctly updates ZoomLevel and Center to show the newly selected shape, it doesn't call SelectStyleCore in the MapShapeStyleSelector to style it.

    How do I call a MapShapeLayer's SelectStyleCore when the user changes the selection in a ListView in the Page's side-drawer?


  2. Yana
    Yana avatar
    4950 posts

    Posted 07 Aug 2019 Link to this post

    Hello mc alex,

    Thank you for describing in details the scenario you have.

    I am not familiar with the exact implementation, still, I would suggest you try to reset the ShapeStyleSelector the Map is using - just preserve it in a temporary variable, set it to null and then re-assign it - this will force the SelectStyleCore method and the new styles would be applied.

    If this does not help, please send me more details on the implementation (some code snippets would be useful), so I could research for a different approach.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. mc
    mc avatar
    4 posts
    Member since:
    Jul 2019

    Posted 12 Aug 2019 in reply to Yana Link to this post

    Hi Yana,

    Your suggestion worked. :-)   I have set the ListView to recreate the ShapeLayer's ShapeStyleSelector on its SelectionChanged event.   I was trying to engineer a pure mvvm solution, but I'm guessing this isn't possible.   

    Many thanks


Back to Top