Makes the current object unmodifiable and sets its IsFrozen property to true.
Assembly: WindowsBase (in WindowsBase.dll)
You cannot freeze a Freezable object if any one of the following conditions is true about the object:
It has animated or data bound properties.
It has properties that are set by a dynamic resource. For more information about dynamic resources, see the XAML Resources.
It contains Freezable sub-objects that cannot be frozen.
If these conditions are false for your Freezable object and you do not intend to modify it, consider freezing it to gain performance benefits.
|How to: Determine Whether a Freezable Is Frozen||This example shows how to determine whether a Freezable object is frozen. If you try to modify a frozen Freezable object, it throws an InvalidOperationException. To avoid throwing this exception, use the IsFrozen property of the Freezable object to determine whether it is frozen.|
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, 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.