Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

EditableTextContent Class

Defines text content for editable annotations and constant lines.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public class EditableTextContent :
    Control,
    IEditableContent

#Remarks

When an annotation’s Content or constant line title’s Content property is set to an EditableTextContent object, users can double-click the annotation text (constant line title) and edit it. Users should click Enter, Esc or a point outside the edit field to complete editing. To add a new line to a text annotation, click Shift + Enter.

Users can use the Add Text Annotation, Add Horizontal Constant Line and Add Vertical Constant Line buttons in the Chart Toolbar/Ribbon to add editable text annotations and constant lines with editable titles.

#Example

The following example demonstrates how to create an editable text annotation:

<dxc:ChartControl>
  <dxc:ChartControl.Annotations>
    <dxc:Annotation>
        <dxc:Annotation.Content>
            <dxc:EditableTextContent Text="Annotation"/>
        </dxc:Annotation.Content>
        <dxc:Annotation.AnchorPoint>
            <dxc:ChartAnchorPoint X="100" Y="170"/>
        </dxc:Annotation.AnchorPoint>
        <dxc:Annotation.ShapePosition>
            <dxc:RelativePosition/>
        </dxc:Annotation.ShapePosition>                        
    </dxc:Annotation>
  </dxc:ChartControl.Annotations>
  ...
</dxc:ChartControl>  
See Also