/// <summary> /// Override to implement custom initialization code for this dockpane /// </summary> /// <returns></returns> protected override Task InitializeAsync() { // TODO Step 2 - make sure that AllMaps can be updated from work threads as well as the UI thread BindingOperations.EnableCollectionSynchronization(AllMaps, _lockMapCollection); // TODO Step 2 - subscribe to the ArcGISProjectItemsChangedEvents ArcGISProjectItemsChangedEvents.Subscribe(OnProjectCollectionChanged); return(base.InitializeAsync()); }
/// <summary> /// override to implement custom un-initialisation code for when this dockpane closes. /// </summary> /// <returns></returns> protected override Task UninitializeAsync() { // unsubscribe from all events // Step 2 - unsubscribe ArcGISProjectItemsChangedEvents.Unsubscribe(OnProjectCollectionChanged); ArcGISProjectClosedEvents.Unsubscribe(OnProjectClosed); return(base.UninitializeAsync()); }
/// <summary> /// Override to implement custom initialisation code for this dockpane /// </summary> /// <returns></returns> protected override Task InitializeAsync() { // Step 2 - subscribe to the ProjectItem changed event ArcGISProjectItemsChangedEvents.Subscribe(OnProjectCollectionChanged); // project closed event ArcGISProjectClosedEvents.Unsubscribe(OnProjectClosed); return(base.InitializeAsync()); }
/// <summary> /// Constructor to initialize the ComboBox /// </summary> public MapViewsComboBox() { ArcGISProjectItemsChangedEvents.Subscribe(OnProjectCollectionChanged); //subscribe to the Project Items changed event UpdateCombo(); }