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

Frame.UriMapper Property

Silverlight

Gets or sets the object to manage converting a uniform resource identifier (URI) to another URI for this frame.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)
public UriMapperBase UriMapper { get; set; }
<sdk:Frame.UriMapper>
  singleUriMapperBase
</sdk:Frame.UriMapper>

XAML Values

singleUriMapperBase

An object that facilitates URI mapping, typically UriMapper.

Property Value

Type: System.Windows.Navigation.UriMapperBase
The object to convert URIs for this frame.

Dependency property identifier field: UriMapperProperty

You use an instance of a class that derives from UriMapperBase to store the collection of UriMapping objects to use for converting a requested URI to another URI. Typically, you will use an instance of the UriMapper class as it provides the most common implementation. You assign the URI mapper object for the frame to the UriMapper property.

The following example shows the XAML for a frame that includes URI mapping definitions. The frame will navigate to the value of its Source property, which in this example is set by default to /Home.


<sdk:Frame 
       x:Name="ContentFrame" 
       Style="{StaticResource ContentFrameStyle}" 
       Source="/Home" 
       Navigated="ContentFrame_Navigated" 
       NavigationFailed="ContentFrame_NavigationFailed">
    <sdk:Frame.UriMapper>
        <sdk:UriMapper>
            <sdk:UriMapping 
                Uri="/ProductDetail/{productid}" 
                MappedUri="/Views/ProductDetail.xaml?ProductId={productid}"/>
            <sdk:UriMapping 
                Uri="/Reports/{type}/{selection}" 
                MappedUri="/Views/ReportsPage.xaml?type={type}&amp;selection={selection}"/>
            <sdk:UriMapping 
                Uri="/{pageName}" 
                MappedUri="/Views/{pageName}.xaml"/>
        </sdk:UriMapper>
    </sdk:Frame.UriMapper>
</sdk:Frame>


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:
© 2014 Microsoft. All rights reserved.