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.

适用于