XamlMember.IsAmbient Property

.NET Framework (current version)
 

Gets a value that indicates whether this XamlMember is reported as an ambient property.

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

public bool IsAmbient { get; }

Property Value

Type: System.Boolean

true if this XamlMember is reported as an ambient property; otherwise, false.

Calling IsAmbient invokes LookupIsAmbient or a specific override of that method. This behavior occurs in implementations where the initial internal reflection logic has not already set the information.

Checking for ambient properties is 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 .NET Framework XAML Services APIs and the default XAML schema context populates this value based on attribution with AmbientAttribute. The default implementation of LookupIsAmbient uses this existing AmbientAttribute technique, and it returns true if AmbientAttribute exists on a member declaration.

AmbientAttribute is found on members of several WPF types, which include Application, Setter, and Style. It is also found on the ResourceDictionary type, which connotes that any member that uses ResourceDictionary as its type should be considered ambient even if the member is not specifically attributed.

.NET Framework
Available since 4.0
Return to top
Show: