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用于所有情况下,在其中一个依赖项属性具有上建立的本地值DependencyObjectThe 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.

适用于