Select to view content in your preferred language

MapMemberPropertiesChangedEvent MapMembers and EventHints Lists

380
1
10-31-2023 09:12 PM
DaveFullerton
Frequent Contributor

Looking at the documentation here:

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12753.html

I see:
"The MapMemberEventHint enumerable and the MapMember enumerable have a one to one mapping."

I have been testing my code in this Event. If I change both minimum and maximum scale on a feature layer, the event fires once and MapMembers (IList<MapMember>) contains three references all to the same MapMember (the feature layer). EventHints (IList<MapMemberEventHint> ) contains EventHints of Any, MinScale, and MaxScale. When I select two feature layers at the same time and change the min and max scales, the event fires twice with the same result as above each time.

What are examples (or are there any?) of a user changing some properties, the event firing, and in that single event there are references to more than one MapMember in MapMembers (IList<MapMember>)? In other words, are the MapMembers in the MapMembers list always all the same? If not, when does it happen?

Looking at the documentation here:
https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12615.html

I see:

DaveFullerton_0-1698811578637.png

 

This description sounds to me like: “Any is the value you will get when a property is changed that is not specifically represented in the rest of this enumeration. When more than one property is changed that is not specifically represented in this enumeration, you will still only get one EventHint of Any.” If that is not correct or complete, please let me know.

When I change the name of a feature layer through the Properties dialog, there are EditHints of Any and Name. When I change the name through the Contents Pane, there is only an EditHint of Name. Why are these cases different?

0 Kudos
1 Reply
UmaHarano
Esri Regular Contributor

Hi Dave

In majority of the cases, the MapMemberPropertiesChangedEvent is fired per layer.  So, MapMembers in the MapMembers list is always the same layer in the majority of the cases.  I am investigating to see if there are any edge cases where this is not true.

Regarding the event hint in the changing of the layer name via the Properties page or the Contents pane - that does look like an inconsistency. Thanks for reporting this one!