BindableObject.ClearValue 方法

定義

多載

ClearValue(BindableProperty)

清除 SetValue 針對 property 所設定的任何值。

ClearValue(BindablePropertyKey)

清除 SetValue 針對 propertyKey 所識別屬性設定的任何值。

ClearValue(BindableProperty)

清除 SetValue 針對 property 所設定的任何值。

public void ClearValue (Xamarin.Forms.BindableProperty property);
member this.ClearValue : Xamarin.Forms.BindableProperty -> unit

參數

property
BindableProperty

要清除的 BindableProperty。

備註

在 readonly 屬性上呼叫這個方法會導致 InvalidOperationException。

適用於

ClearValue(BindablePropertyKey)

清除 SetValue 針對 propertyKey 所識別屬性設定的任何值。

public void ClearValue (Xamarin.Forms.BindablePropertyKey propertyKey);
member this.ClearValue : Xamarin.Forms.BindablePropertyKey -> unit

參數

propertyKey
BindablePropertyKey

BindablePropertyKey,可識別要清除的 BindableProperty

備註

在 readonly 屬性上呼叫這個方法會導致 InvalidOperationException。

適用於