Span Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a section of a FormattedString.
public ref class Span : Microsoft::Maui::Controls::GestureElement, Microsoft::Maui::Controls::IDecorableTextElement, Microsoft::Maui::Controls::Internals::IFontElement
[Microsoft.Maui.Controls.ContentProperty("Text")]
public class Span : Microsoft.Maui.Controls.GestureElement, Microsoft.Maui.Controls.IDecorableTextElement, Microsoft.Maui.Controls.Internals.IFontElement
[<Microsoft.Maui.Controls.ContentProperty("Text")>]
type Span = class
inherit GestureElement
interface IFontElement
interface IDecorableTextElement
Public Class Span
Inherits GestureElement
Implements IDecorableTextElement, IFontElement
- Inheritance
- Attributes
- Implements
Remarks
Bindings to Span properties are OneTime by default.
Constructors
| Span() |
Initialize a new instance of the Span class. |
Fields
| BackgroundColorProperty |
Backing store for the BackgroundColor property. |
| CharacterSpacingProperty | |
| FontAttributesProperty |
Backing store for the FontAttributes property. |
| FontAutoScalingEnabledProperty | |
| FontFamilyProperty |
Backing store for the FontFamily property. |
| FontSizeProperty |
Backing store for the FontSize property. |
| LineHeightProperty |
Backing store for the LineHeight bindable property. |
| StyleProperty |
Backing store for the Style property. |
| TextColorProperty |
Backing store for the TextColor property. |
| TextDecorationsProperty |
The BindableProperty associated with the TextDecorations property. |
| TextProperty |
Backing store for the Text property. |
| TextTransformProperty | |
Properties
| AutomationId |
Gets or sets a value that allows the automation framework to find and interact with this element. (Inherited from Element) |
| BackgroundColor |
Gets or sets the Color of the span background. |
| 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) |
| CharacterSpacing | |
| ClassId |
Gets or sets a value used to identify a collection of semantically similar elements. (Inherited from Element) |
| Dispatcher | (Inherited from BindableObject) |
| EffectControlProvider |
For internal use by the Microsoft.Maui.Controls platform. (Inherited from Element) |
| Effects |
A list of the effects that are applied to this item. (Inherited from Element) |
| FontAttributes |
Gets a value that indicates whether the font for the span is bold, italic, or neither. |
| FontAutoScalingEnabled | |
| FontFamily |
Gets the font family to which the font for the text in the span belongs. |
| FontSize |
Gets the size of the font for the text in the span. |
| GestureRecognizers |
Gets the list of recognizers that belong to the element. (Inherited from GestureElement) |
| Handler | (Inherited from Element) |
| Id |
Gets a value that can be used to uniquely identify an element through the run of an application. (Inherited from Element) |
| LineHeight |
Gets or sets the multiplier to apply to the default line height when displaying text. |
| LogicalChildren |
Obsolete.
For internal use by the Microsoft.Maui.Controls platform. (Inherited from Element) |
| Parent |
Gets or sets the parent element of the element. (Inherited from Element) |
| RealParent |
For internal use by the Microsoft.Maui.Controls platform. (Inherited from Element) |
| Style |
Gets or sets the Style to apply to the span. |
| StyleId |
Gets or sets a user defined value to uniquely identify the element. (Inherited from Element) |
| Text |
Gets or sets the text of the span. |
| TextColor |
Gets or sets the text color. |
| TextDecorations |
Gets or sets the TextDecorations applied to this span. |
| TextTransform | |
Methods
| ApplyBindings() | (Inherited from BindableObject) |
| ClearValue(BindableProperty) |
Clears any value set by SetValue for |
| ClearValue(BindablePropertyKey) |
Clears any value set by SetValue for the property that is identified by |
| CoerceValue(BindableProperty) | (Inherited from BindableObject) |
| CoerceValue(BindablePropertyKey) | (Inherited from BindableObject) |
| EffectIsAttached(String) |
For internal use by the Microsoft.Maui.Controls platform. (Inherited from Element) |
| FindByName(String) |
Returns the element that has the specified name. (Inherited from Element) |
| GetValue(BindableProperty) |
Returns the value that is contained in the BindableProperty. (Inherited from BindableObject) |
| IsSet(BindableProperty) |
Returns |
| OnBindingContextChanged() | |
| OnChildAdded(Element) | (Inherited from Element) |
| OnChildRemoved(Element, Int32) | (Inherited from Element) |
| OnHandlerChanged() | (Inherited from Element) |
| OnHandlerChanging(HandlerChangingEventArgs) | (Inherited from Element) |
| OnParentChanged() | (Inherited from Element) |
| OnParentChanging(ParentChangingEventArgs) | (Inherited from Element) |
| OnParentSet() | (Inherited from Element) |
| OnPropertyChanged(String) | (Inherited from Element) |
| OnPropertyChanging(String) | (Inherited from BindableObject) |
| RemoveBinding(BindableProperty) |
Removes a previously set binding. (Inherited from BindableObject) |
| RemoveDynamicResource(BindableProperty) |
Removes a previously set dynamic resource (Inherited from Element) |
| SetBinding(BindableProperty, BindingBase) |
Assigns a binding to a property. (Inherited from BindableObject) |
| 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) |
Sets the value of the specified property. (Inherited from BindableObject) |
| SetValue(BindablePropertyKey, Object) |
Sets the value of the propertyKey. (Inherited from BindableObject) |
| SetValueCore(BindableProperty, Object, SetValueFlags) |
For internal use by the Microsoft.Maui.Controls platform. (Inherited from BindableObject) |
| SetValueFromRenderer(BindableProperty, Object) |
For internal use by the Microsoft.Maui.Controls platform. (Inherited from Element) |
| SetValueFromRenderer(BindablePropertyKey, Object) |
For internal use by the Microsoft.Maui.Controls platform. (Inherited from Element) |
| UnapplyBindings() | (Inherited from BindableObject) |
| UpdateFormsText(String, TextTransform) | |
Events
| BindingContextChanged | (Inherited from BindableObject) |
| ChildAdded | (Inherited from Element) |
| ChildRemoved | (Inherited from Element) |
| DescendantAdded | (Inherited from Element) |
| DescendantRemoved | (Inherited from Element) |
| HandlerChanged | (Inherited from Element) |
| HandlerChanging | (Inherited from Element) |
| ParentChanged | (Inherited from Element) |
| ParentChanging | (Inherited from Element) |
| PropertyChanged | (Inherited from BindableObject) |
| PropertyChanging | (Inherited from BindableObject) |