IValueSerializerContext IValueSerializerContext IValueSerializerContext 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.

public interface class IValueSerializerContext : IServiceProvider, System::ComponentModel::ITypeDescriptorContext
public interface IValueSerializerContext : IServiceProvider, System.ComponentModel.ITypeDescriptorContext
type IValueSerializerContext = interface
    interface ITypeDescriptorContext
    interface IServiceProvider
Public Interface IValueSerializerContext
Implements IServiceProvider, ITypeDescriptorContext


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 4, IValueSerializerContext is in the System.Xaml assembly. For more information, see Types Migrated from WPF to System.Xaml.


GetService(Type) GetService(Type) GetService(Type) GetService(Type)

Gets the service object of the specified type.

(Inherited from IServiceProvider)
GetValueSerializerFor(PropertyDescriptor) GetValueSerializerFor(PropertyDescriptor) GetValueSerializerFor(PropertyDescriptor) GetValueSerializerFor(PropertyDescriptor)

Gets a ValueSerializer for the given property descriptor.

GetValueSerializerFor(Type) GetValueSerializerFor(Type) GetValueSerializerFor(Type) GetValueSerializerFor(Type)

Gets the ValueSerializer associated with the specified type.

OnComponentChanged() OnComponentChanged() OnComponentChanged() OnComponentChanged()

Raises the ComponentChanged event.

(Inherited from ITypeDescriptorContext)
OnComponentChanging() OnComponentChanging() OnComponentChanging() OnComponentChanging()

Raises the ComponentChanging event.

(Inherited from ITypeDescriptorContext)


Container Container Container Container

Gets the container representing this TypeDescriptor request.

(Inherited from ITypeDescriptorContext)
Instance Instance Instance Instance

Gets the object that is connected with this type descriptor request.

(Inherited from ITypeDescriptorContext)
PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor

Gets the PropertyDescriptor that is associated with the given context item.

(Inherited from ITypeDescriptorContext)

Applies to

See also