DependencyObject.ShouldSerializeProperty(DependencyProperty) 方法

定義

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。

protected public:
 virtual bool ShouldSerializeProperty(System::Windows::DependencyProperty ^ dp);
protected internal virtual bool ShouldSerializeProperty (System.Windows.DependencyProperty dp);
abstract member ShouldSerializeProperty : System.Windows.DependencyProperty -> bool
override this.ShouldSerializeProperty : System.Windows.DependencyProperty -> bool
Protected Friend Overridable Function ShouldSerializeProperty (dp As DependencyProperty) As Boolean

參數

dp
DependencyProperty

應該序列化之相依性屬性的識別項。

傳回

Boolean

如果應該序列化所提供相依性屬性的值,則為 true;否則為 false

備註

預設實作會針對相依性屬性在 上 DependencyObject 建立本機值的所有案例傳回 true

給繼承者的注意事項

這個方法的覆寫可能會以不同的方式處理特定的相依性屬性。

適用於