Span Span Class

Definition

Represents a section of a FormattedString.

[Xamarin.Forms.ContentProperty("Text")]
public class Span : Xamarin.Forms.GestureElement, Xamarin.Forms.IDecorableTextElement, Xamarin.Forms.Internals.IFontElement
type Span = class
    inherit GestureElement
    interface IFontElement
    interface IDecorableTextElement
Inheritance
Attributes
Implements

Remarks

Bindings to Span properties are OneTime by default.

Constructors

Span() Span()

Initialize a new instance of the Span class.

Fields

BackgroundColorProperty BackgroundColorProperty

Backing store for the BackgroundColor property.

FontAttributesProperty FontAttributesProperty

Backing store for the FontAttributes property.

FontFamilyProperty FontFamilyProperty

Backing store for the FontFamily property.

FontProperty FontProperty

Backing store for the Font property.

FontSizeProperty FontSizeProperty

Backing store for the FontSize property.

ForegroundColorProperty ForegroundColorProperty

Backing store for the ForegroundColor property.

LineHeightProperty LineHeightProperty

Backing store for the LineHeight bindable property.

StyleProperty StyleProperty

Backing store for the Style property.

TextColorProperty TextColorProperty

Backing store for the TextColor property.

TextDecorationsProperty TextDecorationsProperty

The BindableProperty associated with the TextDecorations property.

TextProperty TextProperty

Backing store for the Text property.

Properties

AutomationId AutomationId

Gets or sets a value that allows the automation framework to find and interact with this element.

(Inherited from Element)
BackgroundColor BackgroundColor

Gets or sets the Color of the span background.

BindingContext BindingContext

Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject.

(Inherited from BindableObject)
ClassId ClassId

Gets or sets a value used to identify a collection of semantically similar elements.

(Inherited from Element)
EffectControlProvider EffectControlProvider

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
Effects Effects

A list of the effects that are applied to this item.

(Inherited from Element)
Font Font

Gets or sets the Font for the text in the span.

FontAttributes FontAttributes

Gets a value that indicates whether the font for the span is bold, italic, or neither.

FontFamily FontFamily

Gets the font family to which the font for the text in the span belongs.

FontSize FontSize

Gets the size of the font for the text in the span.

ForegroundColor ForegroundColor

Gets or sets the Color for the text in the span.

GestureRecognizers GestureRecognizers

Gets the list of recognizers that belong to the element.

(Inherited from GestureElement)
Id Id

Gets a value that can be used to uniquely identify an element through the run of an application.

(Inherited from Element)
ISpatialElement.Region ISpatialElement.Region

For internal use by the Xamarin.Forms platform.

(Inherited from GestureElement)
LineHeight LineHeight

Gets or sets the multiplier to apply to the default line height when displaying text.

LogicalChildren LogicalChildren

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
Parent Parent

Gets or sets the parent element of the element.

(Inherited from Element)
ParentView ParentView

Gets the element which is the closest ancestor of this element that is a VisualElement.

(Inherited from Element)
Platform Platform Inherited from Element
RealParent RealParent

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
Style Style

Gets or sets the Style to apply to the span.

StyleId StyleId

Gets or sets a user defined value to uniquely identify the element.

(Inherited from Element)
Text Text

Gets or sets the text of the span.

TextColor TextColor

Gets or sets the text color.

TextDecorations TextDecorations

Gets or sets the TextDecorations applied to this span.

Methods

ApplyBindings() ApplyBindings()

Apply the bindings to BindingContext.

(Inherited from BindableObject)
ClearValue(BindableProperty) ClearValue(BindableProperty)

Clears any value set by SetValue for property.

(Inherited from BindableObject)
ClearValue(BindablePropertyKey) ClearValue(BindablePropertyKey)

Clears any value set by SetValue for the property that is identified by propertyKey.

(Inherited from BindableObject)
Descendants() Descendants()

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
EffectIsAttached(String) EffectIsAttached(String)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
FindByName(String) FindByName(String)

Returns the element that has the specified name.

(Inherited from Element)
GetValue(BindableProperty) GetValue(BindableProperty)

Returns the value that is contained the BindableProperty.

(Inherited from BindableObject)
GetValues(BindableProperty, BindableProperty) GetValues(BindableProperty, BindableProperty)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
GetValues(BindableProperty, BindableProperty, BindableProperty) GetValues(BindableProperty, BindableProperty, BindableProperty)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
IsSet(BindableProperty) IsSet(BindableProperty)

Returns true if the target property exists and has been set.

(Inherited from BindableObject)
OnBindingContextChanged() OnBindingContextChanged()

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

OnChildAdded(Element) OnChildAdded(Element)

Invoked whenever the ChildAdded event needs to be emitted. Implement this method to add class handling for this event.

(Inherited from Element)
OnChildRemoved(Element) OnChildRemoved(Element)

Invoked whenever the ChildRemoved event needs to be emitted. Implement this method to add class handling for this event.

(Inherited from Element)
OnParentSet() OnParentSet()

Invoked whenever the Parent of an element is set. Implement this method in order to add behavior when the element is added to a parent.

(Inherited from Element)
OnPropertyChanged(String) OnPropertyChanged(String)

Method that is called when a bound property is changed.

(Inherited from Element)
OnPropertyChanging(String) OnPropertyChanging(String)

Call this method from a child class to notify that a change is going to happen on a property.

(Inherited from BindableObject)
RemoveBinding(BindableProperty) RemoveBinding(BindableProperty)

Removes a previously set binding.

(Inherited from BindableObject)
RemoveDynamicResource(BindableProperty) RemoveDynamicResource(BindableProperty)

Removes a previously set dynamic resource

(Inherited from Element)
SetBinding(BindableProperty, BindingBase) SetBinding(BindableProperty, BindingBase)

Assigns a binding to a property.

(Inherited from BindableObject)
SetDynamicResource(BindableProperty, String) SetDynamicResource(BindableProperty, String)

Sets the BindableProperty property of this element to be updated via the DynamicResource with the provided key.

(Inherited from Element)
SetValue(BindableProperty, Object) SetValue(BindableProperty, Object)

Sets the value of the specified property.

(Inherited from BindableObject)
SetValue(BindablePropertyKey, Object) SetValue(BindablePropertyKey, Object)

Sets the value of the propertyKey.

(Inherited from BindableObject)
SetValueCore(BindableProperty, Object, SetValueFlags) SetValueCore(BindableProperty, Object, SetValueFlags)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
SetValueFromRenderer(BindableProperty, Object) SetValueFromRenderer(BindableProperty, Object)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
SetValueFromRenderer(BindablePropertyKey, Object) SetValueFromRenderer(BindablePropertyKey, Object)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
UnapplyBindings() UnapplyBindings()

Unapplies all previously set bindings.

(Inherited from BindableObject)

Explicit Interface Implementations

IDynamicResourceHandler.SetDynamicResource(BindableProperty, String) IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
IElementController.SetValueFromRenderer(BindableProperty, Object) IElementController.SetValueFromRenderer(BindableProperty, Object)

For internal use by the Xamarin.Forms platform.

(Inherited from Element)
IFontElement.FontSizeDefaultValueCreator() IFontElement.FontSizeDefaultValueCreator()

For internal use by the Xamarin.Forms platform.

IFontElement.OnFontAttributesChanged(FontAttributes, FontAttributes) IFontElement.OnFontAttributesChanged(FontAttributes, FontAttributes)

For internal use by the Xamarin.Forms platform.

IFontElement.OnFontChanged(Font, Font) IFontElement.OnFontChanged(Font, Font)

For internal use by the Xamarin.Forms platform.

IFontElement.OnFontFamilyChanged(String, String) IFontElement.OnFontFamilyChanged(String, String)

For internal use by the Xamarin.Forms platform.

IFontElement.OnFontSizeChanged(Double, Double) IFontElement.OnFontSizeChanged(Double, Double)

For internal use by the Xamarin.Forms platform.

INameScope.RegisterName(String, Object) INameScope.RegisterName(String, Object)

For internal use only.

(Inherited from Element)

Events

BindingContextChanged BindingContextChanged

Raised whenever the BindingContext property changes.

(Inherited from BindableObject)
ChildAdded ChildAdded

Occurs whenever a child element is added to the element.

(Inherited from Element)
ChildRemoved ChildRemoved

Occurs whenever a child element is removed from the element.

(Inherited from Element)
DescendantAdded DescendantAdded

Occurs whenever a child element is added to the elements subtree.

(Inherited from Element)
DescendantRemoved DescendantRemoved

Occurs whenever a child element is removed from the elements subtree.

(Inherited from Element)
PlatformSet PlatformSet Inherited from Element
PropertyChanged PropertyChanged

Raised when a property has changed.

(Inherited from BindableObject)
PropertyChanging PropertyChanging

Raised when a property is about to change.

(Inherited from BindableObject)

Extension Methods

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String) SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

Creates and applies a binding to a property.

SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String) SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String)

Creates and applies a binding from an expression.

GetGroup<TView,TItem>(TItem) GetGroup<TView,TItem>(TItem)

For internal use by platform renderers.

GetGroupHeaderContent<TView,TItem>(TItem) GetGroupHeaderContent<TView,TItem>(TItem)

For internal use by platform renderers.

GetIndex<TView,TItem>(TItem) GetIndex<TView,TItem>(TItem)

For internal use by platform renderers.

GetIsGroupHeader<TView,TItem>(TItem) GetIsGroupHeader<TView,TItem>(TItem)

For internal use by platform renderers.

SetIsGroupHeader<TView,TItem>(TItem, Boolean) SetIsGroupHeader<TView,TItem>(TItem, Boolean)

For internal use by platform renderers.

FindByName<T>(Element, String) FindByName<T>(Element, String)

Returns the instance of type T that has name name in the scope that includes element.

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