Changing the "Default Symbol" label

600
3
02-10-2012 07:27 AM
VladimirKnezevic
New Contributor
Is there a way to change the "Default Symbol" label that appears in the legend when a class breaks renderer is used?

I tried creating a behavior, subscribing to LegendChanged event, then querying LegendItemInfos and changing the LegendItemInfo.Label, but it does not work. It does change the label, but probably it happens before some other code that resets it to "Default Symbol".

Thanks
0 Kudos
3 Replies
SamitChakraborty
New Contributor
Is there a way to change the glow surrounding the default symbol?
Please see attachment.
I would like to give the end user an option to change the color of the glow and/or any effects applied to the symbol.
0 Kudos
ElitsaBaklova
New Contributor II
Hi Vladimir,

Please find attached a sample extensibility behavior that I have created to demonstrate how you can change the default symbol label for Class Breaks and Unique Value renderer (see jpg attached), plus how you can also get hold of the ImageSources for each LegendItem in the Legend control.  The behavior that you will see in LegendEventBehavior.cs.txt shows how to get hold of the legend control itself once Map Contents control is loaded, and how to subscribe to Legent.Refreshed event and overwrite the label value. The couple of commented out lines show how to get to the Image Source which you can use to generate better print-outs.

If you want to add your behavior to be part of your default Viewer Application for Silverlight Viewer, you can just modify the Behaviors.xml file to include your new LegendEventBehavior (see Behavior.xml.txt). However, for SharePoint we haven't exposed the Behaviors.xml file, so you will not be able to have your behavior be part of all new Map Web Part that get created, but it will need to be added explicitly to each Map Web Part using the SharePoint Ribbon (ArcGIS Map Web Part -> Application -> Behaviors) once the map web part gets added.

Hope this helps!

Regards,
Elitsa Baklova
0 Kudos
ElitsaBaklova
New Contributor II
Is there a way to change the glow surrounding the default symbol?
Please see attachment.
I would like to give the end user an option to change the color of the glow and/or any effects applied to the symbol.


Hi Samit,

Unfortunately, changing the selection color (yellow/orange glow) is unsupported and there are no workarounds for this. However, we appreciate your feedback and should we make this customizable at a future release, we will let you know!

Kindest regards,
Elitsa Baklova
0 Kudos