UriTypeConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Converts the given object to the type of this converter, using the specified context and culture information.
Assembly: System (in System.dll)
'Declaration Public Overrides Function ConvertFrom ( _ context As ITypeDescriptorContext, _ culture As CultureInfo, _ value As Object _ ) As Object
Parameters
- context
- Type: System.ComponentModel.ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- culture
- Type: System.Globalization.CultureInfo
The CultureInfo to use as the current culture.
- value
- Type: System.Object
The Object to convert to an instance of Uri.
Return Value
Type: System.ObjectA Uri instance that represents the converted Object. If the value parameter is Nothing; then null is returned.
| 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. |
The ConvertFrom method converts an Object to a Uri instance. If the value parameter contains an empty String or Nothing, then Nothing is returned. Any conversion of an unsupported Type will cause an exception.