DeferrableContentConverter.ConvertFrom Method

Definition

Converts the specified stream to a new DeferrableContent object.

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture
CultureInfo

The CultureInfo to use as the current culture.

value
Object

The source stream to convert.

Returns

A new DeferrableContent object.

Exceptions

context is null.

context is not able to provide the necessary XAML schema context for BAML.

-or-

IProvideValueTarget service interpretation of context determines that the target object is not a ResourceDictionary.

-or-

value is not a valid byte stream.

Remarks

The value for context must provide services for IXamlSchemaContextProvider, IRootObjectProvider, IXamlObjectWriterFactory, and IProvideValueTarget. The schema context when IXamlSchemaContextProvider is queried must be an internally implemented XAML schema context that is particular for BAML usages. This prevents most user code scenarios from using DeferrableContentConverter.

Applies to