MapUri Method
Collapse the table of content
Expand the table of content

UriMapping.MapUri Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Converts the specified uniform resource identifier (URI) to a new URI, if the specified URI matches the defined template for converting.

Namespace:  System.Windows.Navigation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

'Declaration
Public Function MapUri ( _
	uri As Uri _
) As Uri

Parameters

uri
Type: System.Uri
The URI to convert.

Return Value

Type: System.Uri
The URI that has been converted or Nothing if the URI cannot be converted.

ExceptionCondition
InvalidOperationException

Uri is Nothing.

-or-

MappedUri is Nothing.

-or-

Uri includes a query string.

-or-

Uri includes a content fragment.

The MapUri method determines whether the value of uri parameter matches the pattern specified in the Uri property. If the two values match, the MapUri method returns the value of the MappedUri property.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft