Skip to main content

AnnotationRepositoryChangingEventArgs Class

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.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;
    }
}

Inheritance

See Also