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

AnnotationTextEditingEventArgs Class

Data for the ChartControl.AnnotationRepositoryChanging event that occurs when the text annotation is edited.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.2.dll

NuGet Packages: DevExpress.Charts, DevExpress.WindowsDesktop.Charts

Declaration

public sealed class AnnotationTextEditingEventArgs :
    AnnotationRepositoryChangingEventArgs

Remarks

You can use AnnotationTextEditingEventArgs if the AnnotationRepositoryChanging event occurs after a user edits the text annotation. Cast the AnnotationRepositoryChangingEventArgs to the AnnotationTextEditingEventArgs type in the AnnotationRepositoryChanging event handler. AnnotationTextEditingEventArgs exposes the NewText property, which contains the new annotation’s text.

The following example gets the new annotation’s text:

void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
  if (e.Change == AnnotationRepositoryChange.Text) {
      AnnotationTextEditingEventArgs textEditingArgs = (AnnotationTextEditingEventArgs)e;
      string newAnnotationText = textEditingArgs.NewText;
      //Add your logic here. 
  }    
}

Inheritance

See Also