Freezable::Freeze Method ()
.NET Framework (current version)
Makes the current object unmodifiable and sets its IsFrozen property to true.
Assembly: WindowsBase (in WindowsBase.dll)
| Exception | Condition |
|---|---|
| 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
Available since 3.0
Available since 3.0
Show: