Back to Devexpress

EditableTextContent Class

wpf-devexpress-dot-xpf-dot-charts-751107bd.md

latest3.1 KB
Original Source

EditableTextContent Class

Defines text content for editable annotations and constant lines.

Namespace : DevExpress.Xpf.Charts

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

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class EditableTextContent :
    Control,
    IEditableContent
vb
Public Class EditableTextContent
    Inherits Control
    Implements 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:

xaml
<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>

Inheritance

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control EditableTextContent

See Also

EditableTextContent Members

EditableImageContent

DevExpress.Xpf.Charts Namespace