Animatable.FreezeCore(Boolean) 方法


使此 Animatable 对象成为不可修改的对象,或确定是否可使其成为不可修改的对象。Makes this Animatable object unmodifiable or determines whether it can be made unmodifiable.

 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



如果此方法只能确定此实例是否可以冻结,则为 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;或者,如果无法使其成为不可修改的,并且副作用是已开始更改此对象的冻结状态,则返回 falseIf 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.


当为时HasAnimatedProperties , false true此方法将返回。This method will return false when HasAnimatedProperties is true.

请勿直接调用此方法 (在实现中调用基时除外)。Do not call this method directly (except when calling base in an implementation). CanFreeze此方法由isChecking (等于true) 和Freeze ( isChecking等于)在内部调用。falseThis 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).