Skip to main content

AnnotationRepositoryChangingEventArgs.Cancel Property

Indicates whether to cancel the annotation change.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v22.2.dll

NuGet Package: DevExpress.Charts

Declaration

public bool Cancel { get; set; }

Property Value

Type Description
Boolean

true, if the annotation change should be canceled; otherwise false.

Remarks

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