Freeze Method
Collapse the table of content
Expand the table of content

Freezable.Freeze Method ()


Makes the current object unmodifiable and sets its IsFrozen property to true.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public void Freeze()

Exception Condition

The Freezable cannot be made unmodifiable.

To avoid the possibility of an InvalidOperationException when calling this method, check the CanFreeze property to determine whether the Freezable can be made unmodifiable before calling this method.

Notes to Inheritors:

This method uses the FreezeCore method to make the Freezable unmodifiable. To modify freezing behavior, override the FreezeCore method.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft