Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

UriTypeConverter.CanConvertFrom Method (ITypeDescriptorContext, Type)

Returns whether this converter can convert an object of the specified source type to an instance of the Uri type.

Namespace:  System
Assembly:  System (in System.dll)
public override bool CanConvertFrom(
	ITypeDescriptorContext context,
	Type sourceType


Type: System.ComponentModel.ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
Type: System.Type
A Type that represents the type that you want to convert from.

Return Value

Type: System.Boolean
A Boolean value that is true if the converter can convert the specified type to an instance of Uri; otherwise, false.

sourceType is null (Nothing in Visual Basic).

The CanConvertFrom method determines if a Type can be converted to a Uri. The sourceType parameter must be String or a Uri type that can be assigned from sourceType , otherwise this method returns false.


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

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.