Intersoft ClientUI Documentation
Uri Property (UriMapping)
Example 



Gets or sets the pattern to match when determining if the requested uniform resource identifier (URI) is converted to a mapped URI.
Syntax
Public Property Uri As Uri
Dim instance As UriMapping
Dim value As Uri
 
instance.Uri = value
 
value = instance.Uri
public Uri Uri {get; set;}
public:
property Uri^ Uri {
   Uri^ get();
   void set (    Uri^ value);
}
Remarks

When a requested URI matches the pattern you specify in the Uri property, the Silverlight framework navigates to the URI you specify in the MappedUri property. Typically, you set the Uri property to a user-friendly value, such as Home, and you set the MappedUri property to the actual file to use for the request, such as /Views/HomePage.xaml.

You map a matching URI for only the portion of the URI that pertains to navigation within the frame that contains the mappings. For a browser-integrated application, this portion is found after the fragment delimiter (#). For example, if your browser-integrated Silverlight application is hosted at http://www.intersoftpt.com/Default.aspx, you specify a matching URI for http://www.intersoftpt.com/Default.aspx#Home by creating an instance of UriMapping that matches Home. Therefore, you can move your Silverlight application to a different Web page or run it as an out-of-browser application and the URIs you have mapped will still work correctly.

For more information, see Navigation Overview.

Example
The following example shows an instance of UriMapper that is defined within a frame named ContentFrame. The element contains a collection of UriMapping objects.
<Intersoft:UXFrame x:Name="ContentFrame">
        <Intersoft:UXFrame.UriMapper>
                <Intersoft:UriMapper>
                        <Intersoft:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                        <Intersoft:UriMapping Uri="/Error" MappedUri="/ErrorPage.xaml"/>
                        <Intersoft:UriMapping Uri="/{page}" MappedUri="/Views/{page}.xaml"/>
                </Intersoft:UriMapper>
        </Intersoft:UXFrame.UriMapper>
</Intersoft:UXFrame>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UriMapping Class
UriMapping Members
Navigation Overview

Send Feedback