Skip to main content
FreezableFreeze Method

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

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

public void Freeze()
void Freeze()
member Freeze : unit -> unit
Public Sub Freeze
Exception Condition

The Freezable cannot be made unmodifiable.

To avoid the possibility of an InvalidOperationException when calling this method, check the 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