XamlMember.LookupIsAmbient Method

Returns whether this XamlMember is reported as an ambient property.

Namespace:  System.Xaml
Assembly:  System.Xaml (in System.Xaml.dll)

protected virtual bool LookupIsAmbient()

Return Value

Type: System.Boolean
true to report this XamlMember as an ambient property; otherwise, false.

This method is invoked by internal calls that check for ambient XAML property information. Ambient property behavior is accounted for in the public API behavior of XAML readers and XAML writers. The internal calls that reference LookupIsAmbient are usually part of XAML processing logic to make sure that objects and values that rely on ambient usage for type qualification can function correctly. The default .NET Framework XAML Services implementation uses CLR attributing to obtain this information from reflection over backing types. Specifically, the default implementation checks for AmbientAttribute and returns true for LookupIsAmbient if AmbientAttribute exists on a member definition.

Override this method if you are not using AmbientAttribute for this purpose and intend to replace that technique for indicating ambient XAML properties with your own technique.

Example APIs from WPF that attribute with AmbientAttribute are Trigger.Property and Style.BasedOn.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft