public sealed class ProjectOpenedEvent : ArcGIS.Core.Events.CompositePresentationEvent<ProjectEventArgs>
Public NotInheritable Class ProjectOpenedEvent Inherits ArcGIS.Core.Events.CompositePresentationEvent(Of ProjectEventArgs)
public sealed class ProjectOpenedEvent : ArcGIS.Core.Events.CompositePresentationEvent<ProjectEventArgs>
Public NotInheritable Class ProjectOpenedEvent Inherits ArcGIS.Core.Events.CompositePresentationEvent(Of ProjectEventArgs)
protected override bool Initialize() //Called when the Module is initialized. { ProjectOpenedEvent.Subscribe(OnProjectOpened); //subscribe to Project opened event return base.Initialize(); } private void OnProjectOpened(ProjectEventArgs obj) //Project Opened event handler { MessageBox.Show($"{Project.Current} has opened"); //show your message box } protected override void Uninitialize() //unsubscribe to the project opened event { ProjectOpenedEvent.Unsubscribe(OnProjectOpened); //unsubscribe return; }
System.Object
ArcGIS.Core.Events.EventBase
ArcGIS.Core.Events.CompositePresentationEvent<TPayload>
ArcGIS.Desktop.Core.Events.ProjectOpenedEvent
Target Platforms: Windows 11, Windows 10