EasingColorKeyFrame.CreateInstanceCore 方法

定义

创建 Freezable 派生类的新实例。 在创建派生类时,必须重写此方法。

protected:
 override System::Windows::Freezable ^ CreateInstanceCore();
protected override System.Windows.Freezable CreateInstanceCore ();
override this.CreateInstanceCore : unit -> System.Windows.Freezable
Protected Overrides Function CreateInstanceCore () As Freezable

返回

Freezable

新实例。

示例

下面的示例演示了典型的实现 CreateInstanceCore

public class MyFreezable : Freezable
{
    // Typical implementation of CreateInstanceCore
    protected override Freezable CreateInstanceCore()
    {
    
        return new MyFreezable();      
    }

    // ...
    // Other code for the MyFreezableClass.
    // ...
}
Public Class MyFreezable
    Inherits Freezable
    ' Typical implementation of CreateInstanceCore
    Protected Overrides Function CreateInstanceCore() As Freezable

        Return New MyFreezable()
    End Function


    ' ...
    ' Other code for the MyFreezableClass.
    ' ...


End Class

注解

动画类间接继承自 Freezable. 因此,需要重写 CreateInstanceCore 方法来构造自定义动画对象。

适用于

另请参阅