Animatable.FreezeCore(Boolean) Animatable.FreezeCore(Boolean) Animatable.FreezeCore(Boolean) Animatable.FreezeCore(Boolean) Method

定義

將這個 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

參數

isChecking
Boolean Boolean Boolean 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.

傳回

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.

備註

false當為時HasAnimatedProperties ,true這個方法會傳回。This 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) 和Freeze (使用isChecking等於false) 在內部呼叫。This method is called internally by CanFreeze (with isChecking equal to true) and Freeze (with isChecking equal to false).

給繼承者的注意事項

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

典型的執行會呼叫基底實作為, 然後在類別Freeze()包含的所有Freezable具類型的屬性上呼叫靜態方法true , 只有在所有屬性都已凍結 (或可能已凍結) 于透過falseisChecking值傳遞的案例。A 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).

適用於

另請參閱