Export (0) Print
Expand All

Freezable.WritePreamble Method

Verifies that the Freezable is not frozen and that it is being accessed from a valid threading context. Freezable implementers should call this method at the beginning of any API that writes to data members that are not dependency properties.

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

protected void WritePreamble ()
protected void WritePreamble ()
protected function WritePreamble ()
You cannot use methods in XAML.

Exception typeCondition

InvalidOperationException

The Freezable instance is frozen and cannot have its members written to.

This method calls VerifyAccess to verify the threading context is accessible, and also will raise an exception if this Freezable instance is already frozen.

Notes to Implementers: Classes that derive from Freezable should call WritePreamble before attempting to write to any members that are not dependency properties. If you call WritePreamble in an API, you can omit a call to ReadPreamble.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft