DependencyObject.ShouldSerializeProperty(DependencyProperty) DependencyObject.ShouldSerializeProperty(DependencyProperty) DependencyObject.ShouldSerializeProperty(DependencyProperty) DependencyObject.ShouldSerializeProperty(DependencyProperty) Method

定義

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。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

參數

dp
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

應序列化之相依性屬性的識別項。The identifier for the dependency property that should be serialized.

傳回

如果提供之相依性屬性的值應該序列化則為 true,否則為 falsetrue 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.

適用於