Frame.UriMapper Property
Microsoft Silverlight will reach end of support after October 2021. Learn more.
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)
Syntax
'Declaration
Public Property UriMapper As UriMapperBase
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.
Remarks
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.
Examples
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}&selection={selection}"/>
<sdk:UriMapping
Uri="/{pageName}"
MappedUri="/Views/{pageName}.xaml"/>
</sdk:UriMapper>
</sdk:Frame.UriMapper>
</sdk:Frame>
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also