UriMapper Class

July 28, 2014

Converts a uniform resource identifier (URI) into a new URI based on the rules of a matching object specified in a collection of mapping objects.

Namespace:  System.Windows.Navigation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

[ContentPropertyAttribute("UriMappings")]
public sealed class UriMapper : UriMapperBase
<sdk:UriMapper>
  oneOrMoreUriMappings
</sdk:UriMapper> 

XAML Values

oneOrMoreUriMappings

One or more UriMapping object elements.

The UriMapper type exposes the following members.

  NameDescription
Public methodUriMapperInitializes a new instance of the UriMapper class.
Top

  NameDescription
Public propertyUriMappingsGets a collection of objects that are used to convert a uniform resource identifier (URI) into a new URI.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodMapUriConverts a specified uniform resource identifier (URI) into a new URI based on the rules of a matching object in the UriMappings collection. (Overrides UriMapperBase.MapUri(Uri).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

You use the UriMapper class to store the collection of UriMapping objects to use for converting a requested URI to another URI. You define the UriMapper object and its collection of UriMapping objects for a frame by assigning the UriMapper object to the UriMapper property of the frame.

The UriMappings property contains the collections of mapping objects. The MapUri method converts a requested URI to the new URI based on the mappings you defined in objects you added to the UriMappings property.

Typically, you will not need to programmatically call the MapUri method. The Windows Phone framework automatically calls the MapUri method for each request when you have added an instance of the UriMapper class to your application.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2014 Microsoft