.Net 10.2.4 Marker Symbols, no ControlTemplate

4864
10
Jump to solution
10-28-2014 02:57 PM
Highlighted
New Contributor III

MarkerSymbol's are no longer a UI element and we cannot apply a ControlTemplate to them in 10.2.4.  We have some complex symbols that have arrows, labels, status indicators and other UI elements that are bound to properties of inherited Symbols using 10.2.3.  What would be the best approach for us to display complex custom symbols like these in 10.2.4?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Regular Contributor II

Currently you have couple good options for more advanced symbols:

- Use CompositeSymbol Class‌ this is more limited way but works well in many cases. You can also add combine this approach with using Labels. Depending on your needs, this is preferred way and you can do very powerful stuff by combining different kind of symbols with labeling engine.

- Use custom image as symbol using RenderTargetBitmap Class (System.Windows.Media.Imaging)‌. With this approach, you can basically render what ever you want as a symbol. I added sample that shows one way to do this but you can easily use that to see the basic concept. Please note that in that sample no databinding / animation are supported and if you need to implement those, be very careful with the construction of the symbols and the frequency since it will have impact to the performance. Anyway, you get the idea.

Hopefully this helps.

View solution in original post

Reply
0 Kudos
10 Replies
Highlighted
Regular Contributor II

Currently you have couple good options for more advanced symbols:

- Use CompositeSymbol Class‌ this is more limited way but works well in many cases. You can also add combine this approach with using Labels. Depending on your needs, this is preferred way and you can do very powerful stuff by combining different kind of symbols with labeling engine.

- Use custom image as symbol using RenderTargetBitmap Class (System.Windows.Media.Imaging)‌. With this approach, you can basically render what ever you want as a symbol. I added sample that shows one way to do this but you can easily use that to see the basic concept. Please note that in that sample no databinding / animation are supported and if you need to implement those, be very careful with the construction of the symbols and the frequency since it will have impact to the performance. Anyway, you get the idea.

Hopefully this helps.

View solution in original post

Reply
0 Kudos
Highlighted
New Contributor

I guess this works fine (although it sounds annoying to implement) for point symbols, but what is your suggestion for line & fill symbols that use a control template in the WPF Runtime? We use control templates on extended LineSymbols & FillSymbols so we can apply zig zags & other styles of lines as well as add labels around the symbols. How would I allow my user to create a zig zag line with only two control points in the .NET Runtime?

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Before publishing your feature server, define your layer with a zig-zag symbol and labeling enabled and publish it to ArcGIS Server. When consuming it, turn on "AdvanvedSymbology" on the feature table, and we will be able to render the layer with the provided symbology and labeling.

https://developers.arcgis.com/net/desktop/api-reference//html/P_Esri_ArcGISRuntime_Data_ServiceFeatu...

Reply
0 Kudos
Highlighted
New Contributor

I'm not using ArcGIS Server. I'm using only local layers. Also, not all symbols on the layer should be the same, they will all have a different style based on a property that we bind to, which for us is currently bound in the control template.

Reply
0 Kudos
Highlighted
New Contributor

Do you have a suggestion for local feature layers without a feature server published to ArcGIS Server? Our graphic/feature layers are all offline and local.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

You can use ArcGIS Pro or ArcMap to generate Runtime Content (which includes generating the local geodatabases that have the same symbology in them).

Reply
0 Kudos
Highlighted
New Contributor

Do you have an example of this?

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

It's covered here under "Generate a geodatabase from ArcMap"

Create an offline map—ArcGIS Runtime SDK for .NET | ArcGIS for Developers

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

You're saying "no longer" and it was possible in 10.2.3? The .NET SDK has never had symbols with control templates on them. Are you referring to the WPF 10.2.2 SDK? The symbol support in the .NET SDK is equivalent to that of the vaccelerated display in the WPF SDK.

Reply
0 Kudos