Hello,
I am working on a project that uses the ESRI .Net SDK in WPF. On the map view, I need to place buttons that act as place markers and are interactable. I tried using WPF buttons and mapping them to locations on the map, but performance quickly degrades once a large number of buttons are placed. I need all the functionality of a button - clickable, dynamic sizing based on label, easily styled, etc.
I'm just wondering what others have done in terms of similar solutions.
Thanks,
Mike
Hi Mike,
This is a common challenge that using a large number of WPF buttons on a map can cause performance issues because each button is a heavy UI element. Instead, I would advise to use graphics layers (like `GraphicsOverlay`) to display markers and handle clicks with event handlers. You can then show a styled popup or callout when a marker is clicked, mimicking button functionality. For dynamic labels and styling, use custom marker symbols or templates. This way, you keep the map fast and interactive without the overhead of WPF controls for every marker.
I hope this helps!
Thanks for the response.
I had looked into the Graphics/Symbology route briefly. You mention templates - is there a way to template custom markers? I found maintaining consistency in behaviour and look/feel a little difficult.
Thanks.