Export (0) Print
Expand All

IValueSerializerContext Interface

Defines a context that is provided to a ValueSerializer. The context can be used to enable special cases of serialization or different modes of serialization.

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

public interface IValueSerializerContext : ITypeDescriptorContext, 
	IServiceProvider

The IValueSerializerContext type exposes the following members.

  NameDescription
Public propertyContainerGets the container representing this TypeDescriptor request. (Inherited from ITypeDescriptorContext.)
Public propertyInstanceGets the object that is connected with this type descriptor request. (Inherited from ITypeDescriptorContext.)
Public propertyPropertyDescriptorGets the PropertyDescriptor that is associated with the given context item. (Inherited from ITypeDescriptorContext.)
Top

  NameDescription
Public methodGetServiceGets the service object of the specified type. (Inherited from IServiceProvider.)
Public methodGetValueSerializerFor(PropertyDescriptor)Gets a ValueSerializer for the given property descriptor.
Public methodGetValueSerializerFor(Type)Gets the ValueSerializer associated with the specified type.
Public methodOnComponentChangedRaises the ComponentChanged event. (Inherited from ITypeDescriptorContext.)
Public methodOnComponentChangingRaises the ComponentChanging event. (Inherited from ITypeDescriptorContext.)
Top

The IValueSerializerContext interface is a specialized form of the ITypeDescriptorContext context, and is used as one of the input parameters for Convert*String / CanConvert*String methods of a value serializer in the same way as ITypeDescriptorContext is used for context of Convert* / CanConvert* for a TypeConverter.

Public types in WPF that implement a ValueSerializer and thus use IValueSerializerContext for context are found in the System.Windows.Converters and System.Windows.Media.Converters namespaces.

In previous versions of the .NET Framework, this interface existed in the WPF-specific assembly WindowsBase. In .NET Framework version 4, IValueSerializerContext is in the System.Xaml assembly. For more information, see Types Migrated from WPF to System.Xaml.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Community Additions

ADD
Show:
© 2014 Microsoft