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 |
获取或设置范围字符间距。 这是一种可绑定属性。 |
| 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 |
获取或设置范围的文本修饰。 这是一种可绑定属性。 |
| TextTransform |
获取或设置范围的文本转换。 这是一种可绑定属性。 |
方法
活动
| 名称 | 说明 |
|---|---|
| BindingContextChanged |
当 BindingContext 属性的值更改时发生。 (继承自 BindableObject) |
| ChildAdded |
每当将子元素添加到元素时引发。 (继承自 Element) |
| ChildRemoved |
每当从元素中删除子元素时引发。 (继承自 Element) |
| DescendantAdded |
每当将子元素添加到元素的子树时引发。 (继承自 Element) |
| DescendantRemoved |
每当从元素子树中删除子元素时引发。 (继承自 Element) |
| HandlerChanged |
每当元素的处理程序发生更改时引发。 (继承自 Element) |
| HandlerChanging |
每当元素的处理程序开始更改时引发。 (继承自 Element) |
| ParentChanged |
每当元素的父级发生更改时引发。 (继承自 Element) |
| ParentChanging |
每当元素开始更改时引发。 (继承自 Element) |
| PropertyChanged |
在属性值更改时发生。 (继承自 BindableObject) |
| PropertyChanging |
在属性值更改时发生。 (继承自 BindableObject) |