Back to Devexpress

AnnotationImageEditingEventArgs.NewImageFileName Property

corelibraries-devexpress-dot-xtracharts-dot-annotationimageeditingeventargs.md

latest2.1 KB
Original Source

AnnotationImageEditingEventArgs.NewImageFileName Property

Gets or sets the path to a new annotation’s image.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

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

Property Value

TypeDescription
String

A file name that includes the file path.

|

Remarks

The following example gets the file path to the new annotation image:

csharp
void chartControl1_AnnotationRepositoryChanging(object sender, AnnotationRepositoryChangingEventArgs e) {
    if (e.Change == AnnotationRepositoryChange.Image) {
    AnnotationImageEditingEventArgs imageEditingArgs = (AnnotationImageEditingEventArgs)e;
    string imageFile = imageEditingArgs.NewImageFileName;
    //Add your logic here. 
    }
 }
vb
Private Sub chartControl1_AnnotationRepositoryChanging(ByVal sender As Object, ByVal e As AnnotationRepositoryChangingEventArgs)
    If e.Change = AnnotationRepositoryChange.Image Then
        Dim imageEditingArgs As AnnotationImageEditingEventArgs = CType(e, AnnotationImageEditingEventArgs)
        Dim imageFile As String = imageEditingArgs.NewImageFileName
    End If
'Add your logic here.     
End Sub

See Also

AnnotationImageEditingEventArgs Class

AnnotationImageEditingEventArgs Members

DevExpress.XtraCharts Namespace