Skip to main content
A newer version of this page is available. .

AnnotationRepositoryChangingEventArgs.Cancel Property

Indicates whether to cancel the annotation change.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll

NuGet Packages: DevExpress.Charts, DevExpress.WindowsDesktop.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