BindableObject.ClearValue 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ClearValue(BindableProperty) |
清除以前为可绑定属性设置的任何值。 |
ClearValue(BindablePropertyKey) |
清除以前为可绑定属性设置的任何值(由其键标识)。 |
ClearValue(BindableProperty)
清除以前为可绑定属性设置的任何值。
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 清除其值的 。
例外
当 property
为 null
时,将引发此异常。
注解
如果 property
为只读,则不会发生任何操作。
适用于
ClearValue(BindablePropertyKey)
清除以前为可绑定属性设置的任何值(由其键标识)。
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
标识要为其清除值的可绑定属性的键。
例外
当 propertyKey
为 null
时,将引发此异常。
当 是只读属性时 propertyKey
引发。
注解
对只读属性调用此方法将导致 InvalidOperationException。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈