Export (0) Print
Expand All

XamlMember.IsAmbient Property

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

Supported in: 4.6, 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.

Show:
© 2014 Microsoft