UriTypeConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Converts the given object to the type of this converter, using the specified context and culture information.

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

Syntax

'Declaration
Public Overrides Function ConvertFrom ( _
    context As ITypeDescriptorContext, _
    culture As CultureInfo, _
    value As Object _
) As Object
public override Object ConvertFrom(
    ITypeDescriptorContext context,
    CultureInfo culture,
    Object value
)

Parameters

Return Value

Type: System.Object
A Uri instance that represents the converted Object. If the value parameter is nulla null reference (Nothing in Visual Basic); then null is returned.

Exceptions

Exception Condition
NotSupportedException

The conversion cannot be performed. This exception occurs if the value is a type other than String or Uri. or the context or culture parameters are not supported for the value parameter.

Remarks

The ConvertFrom method converts an Object to a Uri instance. If the value parameter contains an empty String or nulla null reference (Nothing in Visual Basic), then nulla null reference (Nothing in Visual Basic) is returned. Any conversion of an unsupported Type will cause an exception.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.