Export (0) Print
Expand All

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.

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

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.5.2, 4.5.1, 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