Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Sets the IsFrozen state to true
on the containing Freezable element. Default behavior for a Freezable without the PresentationOptions:Freeze
attribute specified is that IsFrozen is false
at load time, and dependent on general Freezable behavior at runtime.
<object
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="PresentationOptions">
<freezableElement PresentationOptions:Freeze="true"/>
</object>
Value | Description |
---|---|
PresentationOptions |
An XML namespace prefix, which can be any valid prefix string, per the XML 1.0 specification. The prefix PresentationOptions is used for identification purposes in this documentation. |
freezableElement |
An element that instantiates any derived class of Freezable. |
The Freeze
attribute is the only attribute or other programming element defined in the http://schemas.microsoft.com/winfx/2006/xaml/presentation/options
XML namespace. The Freeze
attribute exists in this special namespace specifically so that it can be designated as ignorable, using mc:Ignorable Attribute as part of the root element declarations. The reason that Freeze
must be able to be ignorable is because not all XAML processor implementations are able to freeze a Freezable at load time; this capability is not part of the XAML specification.
The ability to process the Freeze
attribute is specifically built in to the XAML processor that processes XAML for compiled applications. The attribute is not supported by any class, and the attribute syntax is not extensible or modifiable. If you are implementing your own XAML processor you can choose to parallel the freezing behavior of the WPF XAML processor when processing the Freeze
attribute on Freezable elements at load time.
Any value for the Freeze
attribute other than true
(not case sensitive) generates a load time error. (Specifying the Freeze
attribute as false
is not an error, but that is already the default, so setting to false
does nothing).
.NET Desktop feedback feedback
.NET Desktop feedback is an open source project. Select a link to provide feedback:
Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowDocumentation
Freezable Objects Overview - WPF .NET Framework
Learn how to use and create freezable objects in Windows Presentation Foundation (WPF) applications.
How to: Determine Whether a Freezable Is Frozen - WPF .NET Framework
Learn how to use the IsFrozen property of the Freezable object to determine whether it is frozen and avoid InvalidOperationException.
ResourceDictionary and XAML resource references - Windows apps
Explains how to define a ResourceDictionary element and keyed resources, and how XAML resources relate to other resources that you define as part of your app or app package.