ValueSource ValueSource ValueSource ValueSource Struct

定義

報告從 GetValueSource(DependencyObject, DependencyProperty) 傳回的資訊。Reports the information returned from GetValueSource(DependencyObject, DependencyProperty).

public value class ValueSource
public struct ValueSource
type ValueSource = struct
Public Structure ValueSource
繼承
ValueSourceValueSourceValueSourceValueSource

備註

ValueSource傳輸的大部分資訊都包含BaseValueSource在屬性中。Most of the information that ValueSource transmits is contained in the BaseValueSource property. 這個屬性包含一個列舉值, 它只會指定整體WPFWPF屬性系統的一個層面, 負責相依性屬性的有效值。This property contains an enumeration value that specifies exactly one aspect of the overall WPFWPF property system that is responsible for the effective value of a dependency property.

除了基底值, 其他可能對相依性屬性值感興趣的資訊就是是否要製作動畫, 以及值是否牽涉到運算式 (例如系結或動態資源參考)。Besides the base value, the other information that might be interesting about a dependency property value is whether the value is being animated, and whether the value involves an expression (such as a binding, or a dynamic resource reference). 這項資訊會分別IsAnimatedIsExpression和報告。This information is reported by IsAnimated and IsExpression respectively. 此外, 如果強制型轉在屬性值上運作, 屬性會保留所需的值, 而且如果特定強制的條件約束已變更或已提升, 則屬性值會嘗試到達所需的值。Also, if coercion is acting on a property value, the property retains a desired value, and the property value will attempt to reach that desired value if the constraints of the specific coercion are changed or lifted. 不在其所需值的已轉型屬性會報告IsCoercedtrueA coerced property that is not at its desired value will report that IsCoerced is true.

屬性

BaseValueSource BaseValueSource BaseValueSource BaseValueSource

取得 BaseValueSource 列舉型別 (Enumeration) 的值,這個值報告為相依性屬性系統提供值的來源。Gets a value of the BaseValueSource enumeration, which reports the source that provided the dependency property system with a value.

IsAnimated IsAnimated IsAnimated IsAnimated

取得值,這個值宣告是否建立屬性的動畫。Gets a value that declares whether the property is being animated.

IsCoerced IsCoerced IsCoerced IsCoerced

取得值,這個值宣告 CoerceValueCallback 實作所產生的這個值是否套用至相依性屬性。Gets a value that declares whether this value resulted from a CoerceValueCallback implementation applied to a dependency property.

IsCurrent IsCurrent IsCurrent IsCurrent

取得值是否由 SetCurrentValue(DependencyProperty, Object) 方法所設定。Gets whether the value was set by the SetCurrentValue(DependencyProperty, Object) method.

IsExpression IsExpression IsExpression IsExpression

取得值,這個值宣告該值是否由評估的運算式產生。Gets a value that declares whether this value resulted from an evaluated expression. 這可能是支援繫結的 BindingExpression,或內部運算式 (例如支援 DynamicResource 標記延伸的內部運算式)。This might be a BindingExpression supporting a binding, or an internal expression such as those that support the DynamicResource Markup Extension.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

傳回值,指出這個 ValueSource 是否等於指定的物件。Returns a value indicating whether this ValueSource is equal to a specified object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回這個 ValueSource 的雜湊程式碼。Returns the hash code for this ValueSource.

運算子

Equality(ValueSource, ValueSource) Equality(ValueSource, ValueSource) Equality(ValueSource, ValueSource) Equality(ValueSource, ValueSource)

判斷兩個 ValueSource 執行個體的值是否相同。Determines whether two ValueSource instances have the same value.

Inequality(ValueSource, ValueSource) Inequality(ValueSource, ValueSource) Inequality(ValueSource, ValueSource) Inequality(ValueSource, ValueSource)

判斷兩個 ValueSource 執行個體的值是否不同。Determines whether two ValueSource instances do not have the same value.

適用於

另請參閱