/// <summary> /// Called when [name reference changed]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="NameReferenceChangedEventArgs"/> instance containing the event data.</param> private void OnNameReferenceChanged(object sender, NameReferenceChangedEventArgs e) { IComponentChangeService svc = _context.GetService(typeof(IComponentChangeService)) as IComponentChangeService; if (svc != null) { svc.OnComponentChanged(this._chart, null, null, null); } }
/// <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); } } }
/// <summary> /// Updates the ChartArea alignment references to another chart areas. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="Charting.NameReferenceChangedEventArgs"/> instance containing the event data.</param> internal void ChartAreaNameReferenceChanged(object sender, NameReferenceChangedEventArgs e) { foreach (ChartArea chartArea in this) { if (chartArea.AlignWithChartArea == e.OldName) { chartArea.AlignWithChartArea = e.NewName; } } }
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); } } }