PlatformBehavior<TView> 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
通用用户定义行为的基类,可在连接到平台视图层次结构时响应任意条件和事件。
generic <typename TView>
where TView : VisualElementpublic ref class PlatformBehavior abstract : Microsoft::Maui::Controls::PlatformBehavior<TView, System::Object ^>
public abstract class PlatformBehavior<TView> : Microsoft.Maui.Controls.PlatformBehavior<TView,object> where TView : VisualElement
type PlatformBehavior<'View (requires 'View :> VisualElement)> = class
inherit PlatformBehavior<'View, obj (requires 'View :> VisualElement)>
Public MustInherit Class PlatformBehavior(Of TView)
Inherits PlatformBehavior(Of TView, Object)
类型参数
- TView
虚拟视图
- 继承
构造函数
PlatformBehavior<TView>() |
通用用户定义行为的基类,可在连接到平台视图层次结构时响应任意条件和事件。 |
属性
AssociatedType |
获取 Behavior 可与之关联的对象类型。 (继承自 Behavior) |
BindingContext |
获取或设置一个 对象,该对象包含属于此 BindableObject的绑定属性的目标属性。 这是一种可绑定属性。 (继承自 BindableObject) |
Dispatcher |
获取创建此可绑定对象时可用的调度程序,否则尝试查找最近的可用调度程序 (可能为窗口/应用的) 。 (继承自 BindableObject) |
方法
事件
BindingContextChanged |
当 BindingContext 属性的值更改时发生。 (继承自 BindableObject) |
PropertyChanged |
在属性值更改时发生。 (继承自 BindableObject) |
PropertyChanging |
在属性值更改时发生。 (继承自 BindableObject) |
显式接口实现
IDynamicResourceHandler.SetDynamicResource(BindableProperty, String) |
通用用户定义行为的基类,可在连接到平台视图层次结构时响应任意条件和事件。 (继承自 BindableObject) |
扩展方法
GetPropertyIfSet<T>(BindableObject, BindableProperty, T) |
通用用户定义行为的基类,可在连接到平台视图层次结构时响应任意条件和事件。 |
SetAppTheme<T>(BindableObject, BindableProperty, T, T) |
通用用户定义行为的基类,可在连接到平台视图层次结构时响应任意条件和事件。 |
SetAppThemeColor(BindableObject, BindableProperty, Color, Color) |
通用用户定义行为的基类,可在连接到平台视图层次结构时响应任意条件和事件。 |
SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String) |
创建绑定并将其应用到属性。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈