UriMapper Class
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
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.
Inheritance Hierarchy
System..::.Object
System.Windows.Navigation..::.UriMapperBase
System.Windows.Navigation..::.UriMapper
Namespace: System.Windows.Navigation
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.
Syntax
<ContentPropertyAttribute("UriMappings")> _
Public NotInheritable Class UriMapper _
Inherits UriMapperBase
[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.
Constructors
Name | Description | |
---|---|---|
UriMapper | Initializes a new instance of the UriMapper class. |
Top
Properties
Name | Description | |
---|---|---|
UriMappings | Gets a collection of objects that are used to convert a uniform resource identifier (URI) into a new URI. |
Top
Methods
Name | Description | |
---|---|---|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MapUri | Converts 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).) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
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.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
System.Windows.Navigation Namespace