Class PathAnnotation
Inherited Members
Namespace: Syncfusion.Maui.Diagram
Assembly: Syncfusion.Maui.Diagram.dll
Syntax
public class PathAnnotation : DiagramElement
Remarks
Mirrors the EJ2 Diagram PathAnnotationModel / PathAnnotationModel JSON shape:
{ id, content, offset: { x, y }, horizontalAlignment, verticalAlignment, style }.
Constructors
PathAnnotation()
Initializes a new instance of the PathAnnotation class.
Declaration
public PathAnnotation()
PathAnnotation(String)
Initializes a new instance of the PathAnnotation class with the given label text.
Declaration
public PathAnnotation(string content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | content | The label text. |
Fields
ContentProperty
Identifies the Content bindable property.
Declaration
public static readonly BindableProperty ContentProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
HorizontalAlignmentProperty
Identifies the HorizontalAlignment bindable property.
Declaration
public static readonly BindableProperty HorizontalAlignmentProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
IdProperty
Identifies the Id bindable property.
Declaration
public static readonly BindableProperty IdProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
OffsetProperty
Identifies the Offset bindable property.
Declaration
public static readonly BindableProperty OffsetProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
StyleProperty
Identifies the Style bindable property.
Declaration
public static readonly BindableProperty StyleProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
VerticalAlignmentProperty
Identifies the VerticalAlignment bindable property.
Declaration
public static readonly BindableProperty VerticalAlignmentProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Properties
Content
Gets or sets the label text.
Declaration
public string Content { get; set; }
Property Value
| Type |
|---|
| System.String |
HorizontalAlignment
Gets or sets the horizontal alignment relative to the offset point. On a Connector,
this is mapped to EJ2's "Before"/"Center"/"After" path-relative alignment
(Left → "Before",
Right → "After", anything else → "Center");
VerticalAlignment has no connector-label equivalent and is ignored there.
Declaration
public AnnotationHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
| Type |
|---|
| AnnotationHorizontalAlignment |
Id
Gets or sets the annotation's identifier. Assigned automatically when left null.
Declaration
public string Id { get; set; }
Property Value
| Type |
|---|
| System.String |
Offset
Gets or sets the annotation's horizontal placement. On a Node, this is normalized from 0 (left edge) to 1 (right edge) of the node's bounds. On a Connector, this is reused as the single 0 (source end) to 1 (target end) fraction of distance along the path — EJ2 connector labels have no independent offset, so Offset is ignored there.
Declaration
public double Offset { get; set; }
Property Value
| Type |
|---|
| System.Double |
Style
Gets or sets the text/background appearance.
Declaration
public TextStyle Style { get; set; }
Property Value
| Type |
|---|
| TextStyle |
VerticalAlignment
Gets or sets the vertical alignment relative to the offset point.
Declaration
public AnnotationVerticalAlignment VerticalAlignment { get; set; }
Property Value
| Type |
|---|
| AnnotationVerticalAlignment |