BindableProperty 类

定义

BindableProperty 是允许在 BindableObject 上绑定的属性的后备存储。

public ref class BindableProperty sealed
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.BindablePropertyConverter))]
public sealed class BindableProperty
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.BindablePropertyConverter))>]
type BindableProperty = class
Public NotInheritable Class BindableProperty
继承
BindableProperty
属性

字段

UnsetValue

BindableProperty 是允许在 BindableObject 上绑定的属性的后备存储。

属性

DeclaringType

获取声明 BindableProperty 的类型

DefaultBindingMode

获取默认的 BindingMode。

DefaultValue

获取 BindableProperty 的默认值。

IsReadOnly

获取一个值,该值指示是否从 BindablePropertyKey 创建 BindableProperty。

PropertyName

获取属性名称。

ReturnType

获取 BindableProperty 的类型。

方法

Create(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)

创建 BindableProperty 类的新实例。

CreateAttached(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)

为附加属性创建 BindableProperty 类的新实例。

CreateAttachedReadOnly(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)

为附加的只读属性创建 BindableProperty 类的新实例。

CreateReadOnly(String, Type, Type, Object, BindingMode, BindableProperty+ValidateValueDelegate, BindableProperty+BindingPropertyChangedDelegate, BindableProperty+BindingPropertyChangingDelegate, BindableProperty+CoerceValueDelegate, BindableProperty+CreateDefaultValueDelegate)

创建 BindablePropertyKey 类的新实例。

适用于

另请参阅