FormattedString FormattedString Class

Definition

Represents a text with attributes applied to some parts.

[Xamarin.Forms.ContentProperty("Spans")]
public class FormattedString : Xamarin.Forms.Element
type FormattedString = class
    inherit Element
Inheritance
FormattedStringFormattedString
Attributes

Constructors

FormattedString() FormattedString()

Initializes a new instance of the FormattedString class.

Properties

Spans Spans

Gets the collection of spans.

Methods

OnBindingContextChanged() OnBindingContextChanged()

Method that is called when the binding context is changed.

ToString() ToString()

Returns the text of the formatted string as an unformatted string.

Operators

Explicit(FormattedString to String) Explicit(FormattedString to String)

Cast the FormattedString to a string, stripping all the attributes.

Implicit(String to FormattedString) Implicit(String to FormattedString)

Cast a string to a FormattedString that contains a single span with no attribute set.

Extension Methods

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to