Span 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示 FormattedString 的一个部分。
public ref class Span : Microsoft::Maui::Controls::GestureElement, Microsoft::Maui::Controls::IDecorableTextElement, Microsoft::Maui::Controls::ILineHeightElement, Microsoft::Maui::Controls::Internals::IFontElement, Microsoft::Maui::Controls::ITextElement
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.ILineHeightElement, Microsoft.Maui.Controls.Internals.IFontElement, Microsoft.Maui.Controls.ITextElement
[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 ITextElement
interface ILineHeightElement
interface IDecorableTextElement
[<Microsoft.Maui.Controls.ContentProperty("Text")>]
type Span = class
inherit GestureElement
interface IFontElement
interface IDecorableTextElement
Public Class Span
Inherits GestureElement
Implements IDecorableTextElement, IFontElement, ILineHeightElement, ITextElement
Public Class Span
Inherits GestureElement
Implements IDecorableTextElement, IFontElement
- 继承
- 属性
- 实现
注解
到 Span 属性的绑定默认为 OneTime。
构造函数
| Span() |
初始化 Span 类的新实例。 |
字段
| BackgroundColorProperty |
的可绑定属性 BackgroundColor。 |
| CharacterSpacingProperty |
的可绑定属性 CharacterSpacing。 |
| FontAttributesProperty |
的可绑定属性 FontAttributes。 |
| FontAutoScalingEnabledProperty |
的可绑定属性 FontAutoScalingEnabled。 |
| FontFamilyProperty |
的可绑定属性 FontFamily。 |
| FontSizeProperty |
的可绑定属性 FontSize。 |
| LineHeightProperty |
的可绑定属性 LineHeight。 |
| StyleProperty |
的可绑定属性 Style。 |
| TextColorProperty |
的可绑定属性 TextColor。 |
| TextDecorationsProperty |
的可绑定属性 TextDecorations。 |
| TextProperty |
的可绑定属性 Text。 |
| TextTransformProperty |
的可绑定属性 TextTransform。 |
| transientNamescope |
表示 FormattedString 的一个部分。 (继承自 Element) |
属性
| AutomationId |
获取或设置允许自动化框架查找此元素并与其交互的值。 (继承自 Element) |
| BackgroundColor |
获取或设置范围背景的颜色。 |
| BindingContext |
获取或设置一个对象,该对象包含由属于此 BindableObject属性的绑定属性所面向的属性。 这是一种可绑定属性。 (继承自 BindableObject) |
| CharacterSpacing |
表示 FormattedString 的一个部分。 |
| ClassId |
获取或设置用于标识语义相似元素集合的值。 (继承自 Element) |
| Dispatcher |
获取创建此可绑定对象时可用的调度程序,否则会尝试查找最近的可用调度程序(可能是窗口的/应用)。 (继承自 BindableObject) |
| EffectControlProvider |
供 .NET MAUI 内部使用。 (继承自 Element) |
| Effects |
获取或设置将在运行时应用于元素的样式和属性。 (继承自 Element) |
| FontAttributes |
获取一个值,该值指示范围的字体是粗体、斜体还是两者皆否。 |
| FontAutoScalingEnabled |
表示 FormattedString 的一个部分。 |
| FontFamily |
获取该范围的字体所属的字体系列。 |
| FontSize |
获取该范围中的文本字号。 |
| GestureRecognizers |
获取属于元素的识别器列表。 (继承自 GestureElement) |
| Handler |
获取或设置此元素的关联处理程序。 (继承自 Element) |
| Id |
获取一个值,该值可用于在应用程序运行过程中唯一标识元素。 (继承自 Element) |
| LineHeight |
获取或设置显示文本时要应用于默认行高的乘数。 |
| LogicalChildren |
已过时.
表示 FormattedString 的一个部分。 (继承自 Element) |
| Parent |
获取或设置此元素的父 Element 级。 (继承自 Element) |
| RealParent |
供 .NET MAUI 内部使用。 (继承自 Element) |
| Style |
获取或设置要应用于该范围的样式。 |
| StyleId |
获取或设置用于唯一地标识元素的用户定义的值。 (继承自 Element) |
| Text |
获取或设置该范围的文本。 |
| TextColor |
获取或设置文本颜色。 |
| TextDecorations |
获取或设置应用于此跨度的 TextDecorations。 |
| TextTransform |
表示 FormattedString 的一个部分。 |
方法
事件
| BindingContextChanged |
当 BindingContext 属性的值更改时发生。 (继承自 BindableObject) |
| ChildAdded |
每当将子元素添加到元素时引发。 (继承自 Element) |
| ChildRemoved |
每当从元素中删除子元素时引发。 (继承自 Element) |
| DescendantAdded |
每当将子元素添加到元素的子树时引发。 (继承自 Element) |
| DescendantRemoved |
每当从元素子树中删除子元素时引发。 (继承自 Element) |
| HandlerChanged |
每当元素的处理程序发生更改时引发。 (继承自 Element) |
| HandlerChanging |
每当元素的处理程序开始更改时引发。 (继承自 Element) |
| ParentChanged |
每当元素的父级发生更改时引发。 (继承自 Element) |
| ParentChanging |
每当元素开始更改时引发。 (继承自 Element) |
| PropertyChanged |
在属性值更改时发生。 (继承自 BindableObject) |
| PropertyChanging |
在属性值更改时发生。 (继承自 BindableObject) |