Back to Devexpress

AnnotationTextEditingEventArgs.NewText Property

corelibraries-devexpress-dot-xtracharts-dot-annotationtexteditingeventargs.md

latest2.0 KB
Original Source

AnnotationTextEditingEventArgs.NewText Property

Gets or sets a new annotation’s text.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public string NewText { get; set; }
vb
Public Property NewText As String

Property Value

TypeDescription
String

A new annotation’s text.

|

Remarks

The following example gets the new annotation’s text:

csharp
void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
  if (e.Change == AnnotationRepositoryChange.Text) {
      AnnotationTextEditingEventArgs textEditingArgs = (AnnotationTextEditingEventArgs)e;
      string newAnnotationText = textEditingArgs.NewText;
      //Add your logic here. 
  }    
}
vb
Private Sub chartControl1_AnnotationRepositoryChanging(ByVal sender As Object, ByVal e As AnnotationRepositoryChangingEventArgs)
    If e.Change = AnnotationRepositoryChange.Text Then
        Dim textEditingArgs As AnnotationTextEditingEventArgs = CType(e, AnnotationTextEditingEventArgs)
        Dim newAnnotationText As String = textEditingArgs.NewText
        'Add your logic here.
    End If
End Sub

See Also

AnnotationTextEditingEventArgs Class

AnnotationTextEditingEventArgs Members

DevExpress.XtraCharts Namespace