UriMapping.MapUri Method

Silverlight

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:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)

public Uri MapUri(
	Uri uri
)

Parameters

uri
Type: System.Uri
The URI to convert.

Return Value

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

ExceptionCondition
InvalidOperationException

Uri is null.

-or-

MappedUri is null.

-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.

Silverlight

Supported in: 5, 4, 3

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

Community Additions

ADD
Show: