Get AsFrozen Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a frozen copy of the Freezable, using base (non-animated) property values. Because the copy is frozen, any frozen sub-objects are copied by reference.
public: System::Windows::Freezable ^ GetAsFrozen();
public System.Windows.Freezable GetAsFrozen ();
member this.GetAsFrozen : unit -> System.Windows.Freezable
Public Function GetAsFrozen () As Freezable
The Freezable cannot be frozen because it contains expressions or animated properties.
You should check the CanFreeze property before calling this method to verify that the Freezable can be frozen. Using this method is similar to creating a copy using the Clone and then freezing it with the Freeze method.
|Action||GetAsFrozen method behavior||GetCurrentValueAsFrozen method behavior|
|Copying a dependency property that has an expression||The method throws an InvalidOperationException because it cannot Freeze the property.||The current value of the expression is copied, but not the expression itself.|
|Copying an animated dependency property||The property's base (non-animated) value is copied. Animations are not copied.||The property's current animated value is copied. Animations are not copied.|
Note that unset properties are not copied, nor are read-only properties.
Notes to Inheritors
This method uses the virtual GetAsFrozenCore(Freezable) method to produce the clone.