Animatable.FreezeCore(Boolean) Method

Definition

將這個 Animatable 物件設定為不可修改,或決定是否可以將它設定為不可修改。Makes this Animatable object unmodifiable or determines whether it can be made unmodifiable.

protected:
 override bool FreezeCore(bool isChecking);
protected override bool FreezeCore (bool isChecking);
override this.FreezeCore : bool -> bool
Protected Overrides Function FreezeCore (isChecking As Boolean) As Boolean

Parameters

isChecking
Boolean

如果這個方法應該直接判斷這個執行個體是否可以凍結,則為 truetrue if this method should simply determine whether this instance can be frozen. 呼叫這個方法時,如果這個執行個體本身實際上應該凍結,則為 falsefalse if this instance should actually freeze itself when this method is called.

Returns

Boolean

isCheckingtrue 時,如果可以將這個 Animatable 設定為不可修改,則這個方法會傳回 true,如果無法設定為不可修改,則會傳回 falseIf isChecking is true, this method returns true if this Animatable can be made unmodifiable, or false if it cannot be made unmodifiable.

如果 isCheckingfalse,則當這個 Animatable 現在已經是不可修改時,這個方法會傳回 true,如果它不可以成為不可修改,則會傳回 false,而副作用是會開始變更這個物件的凍結狀態。If isChecking is false, this method returns true if the if this Animatable is now unmodifiable, or false if it cannot be made unmodifiable, with the side effect of having begun to change the frozen status of this object.

Remarks

HasAnimatedProperties true時,這個方法會傳回 falseThis method will return false when HasAnimatedProperties is true.

請勿直接呼叫這個方法(除非是在實作用中呼叫 base)。Do not call this method directly (except when calling base in an implementation). 這個方法是由 CanFreeze (具有 isChecking 等於 true)和 FreezeisChecking 等於 false)在內部呼叫。This method is called internally by CanFreeze (with isChecking equal to true) and Freeze (with isChecking equal to false).

Notes to Inheritors

當類別包含不使用相依性屬性儲存的資料時,衍生自 Animatable 的類別必須覆寫這個方法。Classes that derive from Animatable must override this method when the class contains data that is not stored using dependency properties.

一般的執行會呼叫基底實值,然後在類別所包含的所有 Freezable 具類型的屬性上呼叫靜態 Freeze() 方法,只有在所有屬性都已凍結(或可能已凍結,以通過 isCheckingfalse 值)時,才會傳回 trueA typical implementation would call the base implementation, then call the static Freeze() method on all Freezable typed properties that the class contains, returning true only if all properties were frozen (or could have been frozen, in the case of passing through a false value for isChecking).

Applies to

See also