XamlMember.LookupIsAmbient Method ()

.NET Framework (current version)
 

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
Available since 4.0
Return to top
Show: