DependencyObject.ShouldSerializeProperty(DependencyProperty) 方法
定義
傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.
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
參數
應該序列化之相依性屬性的識別項。The identifier for the dependency property that should be serialized.
傳回
如果應該序列化所提供相依性屬性的值,則為 true
;否則為 false
。true
if the dependency property that is supplied should be value-serialized; otherwise, false
.
備註
true
當相依性屬性在上建立了本機值的所有案例中,預設的實值會傳回 DependencyObject 。The default implementation returns true
for all cases in which a dependency property had a local value established on the DependencyObject.
給繼承者的注意事項
此方法的覆寫可能會以不同的方式處理特定的相依性屬性。Overrides for this method might handle specific dependency properties differently.