Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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()

ExceptionCondition
InvalidOperationException

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

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

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft