/// <summary>
 /// The annotation data collection is changed.
 /// </summary>
 private void dataCollection_Changed(object sender, CollectionChangeEventArgs <AnnotationData> e)
 {
     // if annotation has been added to the collection
     if (e.Action == CollectionChangeActionType.InsertItem || e.Action == CollectionChangeActionType.SetItem)
     {
         AnnotationDataCollection dataCollection = (AnnotationDataCollection)sender;
         AnnotationViewCollection viewCollection = _annotationViewer.AnnotationViewController.GetAnnotationsView(dataCollection);
         // subscribe to the annotation view events
         SubscribeToAnnotationViewEvents(viewCollection.FindView(e.NewValue));
     }
     if (_isEnabled)
     {
         OnDataCollectionChanged((AnnotationDataCollection)sender, e);
     }
 }