/// <summary> /// Raises the <see cref="E:NameReferenceChanged"/> event. /// </summary> /// <param name="e">The <see cref="NameReferenceChangedEventArgs"/> instance containing the event data.</param> void INameController.OnNameReferenceChanged(NameReferenceChangedEventArgs e) { if (!IsSuspended) { if (this.NameReferenceChanged != null) { this.NameReferenceChanged(this, e); } } }
internal void ChartAreaNameReferenceChanged(object sender, NameReferenceChangedEventArgs e) { // If all the chart areas are removed and then a new one is inserted - Annotations don't get bound to it by default if (e.OldElement == null) { return; } foreach (Annotation annotation in this) { if (annotation.ClipToChartArea == e.OldName) { annotation.ClipToChartArea = e.NewName; } AnnotationGroup group = annotation as AnnotationGroup; if (group != null) { group.Annotations.ChartAreaNameReferenceChanged(sender, e); } } }