Esri / runtime-questions

Welcome to the 2017 Esri Developer Summit and the session called, "Everything (or Anything) You Wanted to Know About the ArcGIS Runtime SDKs but Were Afraid to Ask"
12 stars 7 forks source link

Q: Best replacement for WPF Control Templates #43

Closed mikedorais closed 8 years ago

mikedorais commented 9 years ago

We have a data-bound WPF control template that dynamically displays an icon and a complex label, with color coding and symbols. This was removed in Runtime SDK for .Net. The Custom symbols in Quartz seem quite involved and there is a long wait for that. What do you recommend in the meantime if we want to switch to SDK for .Net?

mikedorais commented 9 years ago

See Esri Bug ENH-000087027

mbranscomb commented 8 years ago

@mikedorais There are a few options for more advanced symbology than is provided with the basic renderers and symbol types. Each will need some careful consideration to determine if it fits your scenario. One option if you already have XAML defining the symbols is to use RenderTargetBitmap, which is demonstrated in this XamlPictureMarkerSymbol sample: https://gist.github.com/dotMorten/7272085. This is rendering a static image from the XAML which is used as a PictureMarkerSymbol. For the dynamic display of attribute information the ArcGIS Runtime SDK for .NET also provides a labeling API. The labeling includes conflict detection and a high degree of control over the placement and removal of labels in the case of conflicts. You could also consider using a CompositeSymbol which can be constructed from multiple individual symbols. The CompositeSymbol or 'XamlPictureMarkerSymbol' in conjunction with labeling and a UniqueValue or ClassBreaks renderer I hope will provide the functionality you need in the meantime. For scenarios involving highlighting individual features/graphics you can use MapOverlays as a container for XAML. We are aware these options don't yet provide the equivalent richness we enjoyed directly with XAML in the previous WPF API and are considering how best to support this and additional animation/interactivity in a future release.

mikedorais commented 8 years ago

Thank you. I hope to be able to have in person discussions on this at the Esri Dev Summit this week. We use WPF Control templates that have dynamic count that is data-bound to the Attributes dictionary values. It works very nicely in ArcGIS Runtime SDK for WPF. I suppose that if I use the Render Target Bitmap, I would not be able to rely on data binding directly related to what is displayed on the map. I may be able to use WPF data binding, set up on my own, but one way or another, I would need to regenerate the bitmap every time any dependent property (in this case hierarchical, not just simple one-to-one) changes. I would also need to be able to nail down the place where the geographic center is so that it can be correctly rendered in geographic position on the map. There is some work here but worth looking into. I had looked at composite symbols before, but recall running into shortfalls in functionality. But I do need to see what might be available now in Quartz. Our product needs are difficult to explain via email so I am hoping for in person discussions. Are you going to be at the Dev Summit. If so, can we arrange to meet?

Thank you, Mike Dorais

mbranscomb commented 8 years ago

@mikedorais

Hi Mike

I would love to meet and discuss this further. I'll be at the Dev Summit Monday-Thursday. Please feel free to email me on mbranscomb@esri.com to arrange something.

Cheers

Mike

mikedorais commented 8 years ago

I'm in expo now.

On Sun, Mar 6, 2016, 3:40 PM Mike Branscomb notifications@github.com wrote:

@mikedorais https://github.com/mikedorais

Hi Mike

I would love to meet and discuss this further. I'll be at the Dev Summit Monday-Thursday. Please feel free to email me on mbranscomb@esri.com to arrange something.

Cheers

Mike

— Reply to this email directly or view it on GitHub https://github.com/Esri/runtime-questions/issues/43#issuecomment-193016421 .