menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextAnnotationViewModel - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TextAnnotationViewModel

    Represents a block of text that can be displayed over a node or connector.

    Inheritance
    System.Object
    TextAnnotationViewModel
    Implements
    ITextAnnotation
    INodeAnnotation
    IAnnotation
    System.ComponentModel.INotifyPropertyChanged
    Namespace: Syncfusion.UI.Xaml.Diagram
    Assembly: Syncfusion.SfDiagram.UWP.dll
    Syntax
    public class TextAnnotationViewModel : Object, ITextAnnotation, INodeAnnotation, IAnnotation, INotifyPropertyChanged

    Constructors

    TextAnnotationViewModel()

    Initializes a new instance of the TextAnnotationViewModel class.

    Declaration
    public TextAnnotationViewModel()

    Properties

    AnnotationRelativeMode

    Gets or sets whether the annotation placed on bounds or path.

    Declaration
    public AnnotationRelativeMode AnnotationRelativeMode { get; set; }
    Property Value
    Type
    AnnotationRelativeMode

    Background

    Gets or sets a brush that describes the background.

    Declaration
    public Brush Background { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Media.Brush

    Constraints

    Gets or sets the constraints of the annotation.

    Declaration
    public AnnotationConstraints Constraints { get; set; }
    Property Value
    Type
    AnnotationConstraints

    Content

    Gets or sets the Content of the Annotation.

    Declaration
    public object Content { get; set; }
    Property Value
    Type
    System.Object

    Displacement

    Gets or sets the distance to place the annotation over the connector path (Absolute).

    Declaration
    public double Displacement { get; set; }
    Property Value
    Type
    System.Double

    DragLimit

    To set the DragLimit of the annotation.

    Declaration
    public Thickness DragLimit { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Thickness

    EditTemplate

    Gets or sets the data template used to display the annotation in editmode.

    Declaration
    public DataTemplate EditTemplate { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.DataTemplate

    FontFamily

    Gets or sets the fontfamily of the annotation.

    Declaration
    public FontFamily FontFamily { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Media.FontFamily

    FontSize

    Gets or sets the size of the text.

    Declaration
    public double FontSize { get; set; }
    Property Value
    Type
    System.Double

    FontStyle

    Gets or sets the FontStyle of the Annotation.

    Declaration
    public FontStyle FontStyle { get; set; }
    Property Value
    Type
    Windows.UI.Text.FontStyle

    FontWeight

    Gets or sets the FontWeight of the Annotation.

    Declaration
    public FontWeight FontWeight { get; set; }
    Property Value
    Type
    Windows.UI.Text.FontWeight

    Foreground

    Gets or sets a brush that describes the foreground color.

    Declaration
    public Brush Foreground { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Media.Brush

    HorizontalAlignment

    Gets or sets the horizontal alignment characteristics applied to this element when it is composed within a parent element such as a node or connector.

    Declaration
    public HorizontalAlignment HorizontalAlignment { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.HorizontalAlignment

    LabelWidth

    Gets or sets the width of the annotation(the maximum value of label width and the node width will be considered as label width).

    Declaration
    public double LabelWidth { get; set; }
    Property Value
    Type
    System.Double

    Length

    Gets or sets the distance to place the annotation over the Connector path (Fraction).

    Declaration
    public double Length { get; set; }
    Property Value
    Type
    System.Double

    Margin

    Gets or sets the outer margin of an element.

    Declaration
    public Thickness Margin { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Thickness

    Mode

    Gets or sets whether the annotation is currently being edited or not.

    Declaration
    public ContentEditorMode Mode { get; set; }
    Property Value
    Type
    ContentEditorMode

    Offset

    Gets or sets the fraction/ratio(relative to node) that Gets or sets the position of the Annotation.

    Declaration
    public Point Offset { get; set; }
    Property Value
    Type
    Windows.Foundation.Point

    Pivot

    Gets or sets the annotation should be align based on pivot point.

    Declaration
    public Point Pivot { get; set; }
    Property Value
    Type
    Windows.Foundation.Point

    ReadOnly

    Gets or sets a value indicates whether the annotation is editable.

    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type
    System.Boolean

    RotateAngle

    Gets or sets how the annotation text needs to be rotated.

    Declaration
    public double RotateAngle { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    Default RotateAngle value of LaneHeader's Annotation is 270 degrees. If we want to place the Annotation in the Horizontal direction, we have to set the RotateAngle of LaneHeader's Annotation as 360 degrees.

    RotationReference

    Gets or sets the drag state of annotation.

    Declaration
    public RotationReference RotationReference { get; set; }
    Property Value
    Type
    RotationReference

    Text

    Gets or sets the text of the annotation.

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

    TextHorizontalAlignment

    Gets or sets the horizontal alignment of the annotation's text.

    Declaration
    public TextAlignment TextHorizontalAlignment { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.TextAlignment

    TextTrimming

    Gets or sets the texttrimming of the annotation.

    Declaration
    public TextTrimming TextTrimming { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.TextTrimming

    TextVerticalAlignment

    Gets or sets the vertical alignment of the annotation's text.

    Declaration
    public VerticalAlignment TextVerticalAlignment { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.VerticalAlignment

    TextWrapping

    Gets or sets the TextWrapping of the Annotation.

    Declaration
    public TextWrapping TextWrapping { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.TextWrapping

    UnitHeight

    Gets or sets the height of the annotation.

    Declaration
    public double UnitHeight { get; set; }
    Property Value
    Type
    System.Double

    UnitWidth

    Gets or sets the width of the annotation.

    Declaration
    public double UnitWidth { get; set; }
    Property Value
    Type
    System.Double

    VerticalAlignment

    Gets or sets the vertical alignment characteristics applied to this element when it is composed within a parent element such as a node or connector.

    Declaration
    public VerticalAlignment VerticalAlignment { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.VerticalAlignment

    ViewTemplate

    Gets or sets the data template used to display the annotation in viewmode.

    Declaration
    public DataTemplate ViewTemplate { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.DataTemplate

    WrapText

    Gets or sets how the annotation text needs to be wrapped.

    Declaration
    public TextWrapping WrapText { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.TextWrapping

    Methods

    OnPropertyChanged(String)

    Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides OnPropertyChanged(name).

    Declaration
    protected virtual void OnPropertyChanged(string name)
    Parameters
    Type Name Description
    System.String name

    Events

    PropertyChanged

    Occurs when a property value changes.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    ITextAnnotation
    INodeAnnotation
    IAnnotation
    System.ComponentModel.INotifyPropertyChanged

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved