BindableObject.ClearValue 方法

定义

重载

ClearValue(BindableProperty)

清除以前为可绑定属性设置的任何值。

ClearValue(BindablePropertyKey)

清除以前为其键标识的可绑定属性设置的任何值。

ClearValue(BindableProperty)

Source:
BindableObject.cs
Source:
BindableObject.cs

清除以前为可绑定属性设置的任何值。

public:
 void ClearValue(Microsoft::Maui::Controls::BindableProperty ^ property);
public void ClearValue (Microsoft.Maui.Controls.BindableProperty property);
member this.ClearValue : Microsoft.Maui.Controls.BindableProperty -> unit
Public Sub ClearValue (property As BindableProperty)

参数

property
BindableProperty

BindableProperty 清除其值。

例外

propertynull.

注解

只读时 property ,不会发生任何操作。

适用于

ClearValue(BindablePropertyKey)

Source:
BindableObject.cs
Source:
BindableObject.cs

清除以前为其键标识的可绑定属性设置的任何值。

public:
 void ClearValue(Microsoft::Maui::Controls::BindablePropertyKey ^ propertyKey);
public void ClearValue (Microsoft.Maui.Controls.BindablePropertyKey propertyKey);
member this.ClearValue : Microsoft.Maui.Controls.BindablePropertyKey -> unit
Public Sub ClearValue (propertyKey As BindablePropertyKey)

参数

propertyKey
BindablePropertyKey

标识可绑定属性以清除其值的键。

例外

propertyKeynull.

当为只读属性时 propertyKey 引发。

适用于