Skip to main content
.NET Framework Class Library
FreezableIsFrozen Property

Gets a value that indicates whether the object is currently modifiable.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)
Syntax
Public ReadOnly Property IsFrozen As [%$TOPIC/ms600924_en-us_VS_110_1_0_0_0_0%]
public [%$TOPIC/ms600924_en-us_VS_110_1_0_1_0_0%] IsFrozen { get; }
public:
property [%$TOPIC/ms600924_en-us_VS_110_1_0_2_0_0%] IsFrozen {
	[%$TOPIC/ms600924_en-us_VS_110_1_0_2_0_1%] get ();
}
member IsFrozen : [%$TOPIC/ms600924_en-us_VS_110_1_0_3_0_0%] with get
function get IsFrozen () : [%$TOPIC/ms600924_en-us_VS_110_1_0_4_0_0%]

Property Value

Type: SystemBoolean
true if the object is frozen and cannot be modified; false if the object can be modified.
Remarks

Attempting to modify an object when its IsFrozen property is true throws an InvalidOperationException.

This property is read-only from the object model perspective. Some of the documentation about Freezable behaviors may mention "sets IsFrozen to true" or similar language when discussing the behavior of other methods of Freezable, but this behavior is happening internally in the class instances, when methods of the instance manipulate the private variables that exist within the abstract class. To set the value of this property, you should call Freeze. This effectively is a one-time operation to change the IsFrozen property from the initial default false state to the true state. There is no available means to set the value back to false. Instead, you could change any deep copy made from the original (see the Clone method). This is by design and is how any derived class should behave when applied to the cases where the Freezable pattern is useful.

Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1