chral647

Which layer triggered the VisibilityChanged event?

Discussion created by chral647 on Jun 25, 2013
Latest reply on Jul 4, 2013 by rfairhur24
Hello!

Consider the following code sample, found here and here.

private ILayerEvents_Event pLayerEvents;

void mActiveViewEvents_ItemAdded(object Item)
{
    if (Item is ILayerEvents_Event)            
    {
        pLayerEvents = Item as ILayerEvents_Event;
        pLayerEvents.VisibilityChanged += new ILayerEvents_VisibilityChangedEventHandler(pLayerEvents_VisibilityChanged);
    }
}

void pLayerEvents_VisibilityChanged(bool currentState)
{
    //do something here
}


How can I find out which layer triggered the VisibilityChanged event? The pLayerEvents_VisibilityChanged method only receives the visibility state.


Thanks.

Outcomes