This documentation is archived and is not being maintained.

IXamlSchemaContextProvider Interface

Represents a service that provides XAML schema context information to type converters and markup extensions.

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

public interface IXamlSchemaContextProvider

The IXamlSchemaContextProvider type exposes the following members.

Public propertySchemaContextGets the XamlSchemaContext that is reported by the service context.

The IXamlSchemaContextProvider service provides one property, SchemaContext.

Use the IXamlSchemaContextProvider service and its SchemaContext property when you need the active XAML schema context from a markup extension or type converter implementation. Many XAML-related operations, most notably resolving a XAML type into its backing type for object graph creation, rely on having an available XAML schema context. However, for many scenarios, you can use the XAML schema context that is provided by a particular framework. Or you can use the default XAML schema context provided by .NET Framework XAML Services, which uses CLR and reflection backing and can provide the necessary XAML schema context for any CLR-defined type.

The IXamlSchemaContextProvider service is mainly relevant for implementations that anticipate that their value converter implementation might be called when it is supported by custom XAML schema contexts. You can get the service from the entry-point parameters of the virtual methods of TypeConverter or MarkupExtension that report service context. Or you can instead get the schema context directly from dedicated properties of specific XAML readers or XAML writers.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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