Previously in ArcObjects if you wanted to draw a symbol as an image to use as a preview image (i.e. in like a button) you could use this code: preview IMarkerSymbol symbol however the Symbol class in Runtime does not have the SetupDC, Draw, ResetDC calls in it and I don't see any other properties that would allow binding its image to a button in XAML or code-behind. How would I do the same capability with the symbol classes in ArcGIS Runtime?
Thanks
Solved! Go to Solution.
In ArcGIS Runtime you can use SymbolDisplay from Toolkit to show the symbol.
<esriPrimitives:SymbolDisplay Height="25" Width="30" Symbol="{Binding Symbol}" />
In ArcGIS Runtime you can use SymbolDisplay from Toolkit to show the symbol.
<esriPrimitives:SymbolDisplay Height="25" Width="30" Symbol="{Binding Symbol}" />
Good suggestion from Antti - you can see the source for the SymbolDisplay here: arcgis-toolkit-sl-wpf/SymbolDisplay.cs at master · Esri/arcgis-toolkit-sl-wpf · GitHub.
Another option might be to use RenderTargetBitmap if you have the XAML or are building up the symbols programmatically - there is an example on Github from a previous Dev Summit: tips-and-tricks-wpf/Best-Development-Practices-and-Patterns/PictureMarkerSymbol-From-Wpf/SourceCode ...
Cheers
Mike
Both of these ways will be beneficial now and later. Thanks for the help!