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

Remarks

HasAnimatedProperties true时,此方法将返回 falseThis method will return false when HasAnimatedProperties is true.

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