menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextAnnotation - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TextAnnotation

    This class is used to add a text annotation in SfChart. An instance of this class need to be added to ChartAnnotations collection.

    Inheritance
    System.Object
    ChartAnnotation
    TextAnnotation
    Inherited Members
    ChartAnnotation.Chart
    ChartAnnotation.CoordinateUnit
    ChartAnnotation.CoordinateUnitProperty
    ChartAnnotation.IsVisible
    ChartAnnotation.IsVisibleProperty
    ChartAnnotation.OnTouchDown(Single, Single)
    ChartAnnotation.OnTouchMove(Single, Single)
    ChartAnnotation.OnTouchUp(Single, Single)
    ChartAnnotation.X1
    ChartAnnotation.X1Property
    ChartAnnotation.XAxisName
    ChartAnnotation.XAxisNameProperty
    ChartAnnotation.Y1
    ChartAnnotation.Y1Property
    ChartAnnotation.YAxisName
    ChartAnnotation.YAxisNameProperty
    Namespace: Syncfusion.SfChart.XForms
    Assembly: Syncfusion.SfChart.XForms.dll
    Syntax
    public class TextAnnotation : ChartAnnotation, IThemeElement
    Remarks

    TextAnnotations are used to add simple text in specific points over the chart area.

    Examples
    SfChart chart = new SfChart();
    TextAnnotation text = new TextAnnotation();
    chart.ChartAnnotations.Add(text);

    Constructors

    TextAnnotation()

    Declaration
    public TextAnnotation()

    Fields

    LabelStyleProperty

    Gets the customized style for the annotation text by using the ChartAnnotationLabelStyle. This is a bindable property.

    Declaration
    public static readonly BindableProperty LabelStyleProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    TextProperty

    Gets or sets the text to be displayed on the annotation. This is a bindable property.

    Declaration
    public static readonly BindableProperty TextProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    LabelStyle

    Gets or sets the customized style for the annotation text by using the ChartAnnotationLabelStyle. This is a bindable property.

    Declaration
    public ChartAnnotationLabelStyle LabelStyle { get; set; }
    Property Value
    Type Description
    ChartAnnotationLabelStyle

    This property takes the ChartAnnotationLabelStyle as its value.

    Text

    Gets or sets the text to be displayed on the annotation. This is a bindable property.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    This property takes the string value.

    Methods

    OnBindingContextChanged()

    Override this method to execute an action when the BindingContext changes.

    Declaration
    protected override void OnBindingContextChanged()

    OnParentSet()

    Declaration
    protected override void OnParentSet()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved