Xamarin.Forms Guides | Samples

Xamarin.Forms.FormattedString Class

Represents a text with attributes applied to some parts.

See Also: FormattedString

Syntax

[Xamarin.Forms.ContentProperty("Spans")]
public class FormattedString : INotifyPropertyChanged

Remarks

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.FormattedString are listed below.

See Also: Object

Public Constructors

Initializes a new instance of the FormattedString class.

Public Properties

[read-only]
SpansIList<Span>. Gets the collection of spans.

Public Methods

override
ToString() : String
Returns the text of the formatted string as an unformatted string.

Public Events

PropertyChangedEvent that is raised when a bound property is changed.

Public Operators

static
Conversion to System.String(Explicit)Cast the FormattedString to a string, stripping all the attributes.
static
Conversion to Xamarin.Forms.FormattedString(Implicit)Cast a string to a FormattedString that contains a single span with no attribute set.