Skip to main content
All docs
V25.1
  • AnnotationRepositoryChangingEventArgs Class

    Namespace: DevExpress.XtraCharts

    Assembly: DevExpress.XtraCharts.v25.1.dll

    NuGet Package: DevExpress.Charts

    #Declaration

    public class AnnotationRepositoryChangingEventArgs :
        EventArgs

    #Remarks

    The AnnotationRepositoryChanging event occurs when a user adds, edits or deletes an annotation before this change is applied to the annotation repository. The AnnotationRepositoryChangingEventArgs class exposes the following properties:

    #Example

    The following example prevents Annotation1 from being deleted.

    void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
        if (e.Annotation.Name == "Annotation1" && e.Change == AnnotationRepositoryChange.Deletion) {
            e.Cancel = true;
        }
    }
    
    See Also