Skip to main content
All docs
V25.1
  • EditableTextContent Class

    Defines text content for editable annotations and constant lines.

    Namespace: DevExpress.Xpf.Charts

    Assembly: DevExpress.Xpf.Charts.v25.1.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