Makes the current instance a frozen clone of the specified Freezable. If the object has animated dependency properties, their current animated values are copied.
Assembly: WindowsBase (in WindowsBase.dll)
This method is called by the GetCurrentValueAsFrozen method and should not be called directly from your code, except when calling the base implementation while overriding this method. To create a frozen copy of the current object, call GetCurrentValueAsFrozen instead of calling this method directly.Notes to Inheritors
If you derive from Freezable, you may need to override this method. Reasons to override include the following:
Your derived class has data that is not exposed via dependency properties.
Your derived class must perform extra initialization work that cannot be accomplished by simply overriding CreateInstanceCore. For example, this applies if your derived class implements ISupportInitialize.
Classes that store all their data in dependency properties and that do not need to perform extra initialization work do not need to override .
It is essential that all implementations call the base implementation of this method. Implementations should only perform work that is not performed by the default implementation. The default implementation creates a new Freezable using the CreateInstance method and makes deep copies of unfrozen freezables and shallow copies of all other writable, locally set properties it contains. If the object has data-bound dependency properties, the data bindings are copied but might no longer resolve; for more information about cloning data-bound objects, see Freezable Objects Overview. If the object has animated dependency properties, the current animated value of those properties is copied, but the animations are not.
Read-only dependency properties within a Freezable are not copied by this default implementation.
If you do override this method, you must call the base implementation.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.