Intersoft ClientUI Documentation
Uri Property
See Also  Example Send Feedback
Intersoft.Client.UI.Navigation Namespace > UriMapping Class : Uri Property






Gets or sets the pattern to match when determining if the requested uniform resource identifier (URI) is converted to a mapped URI.

Syntax

Visual Basic (Declaration) 
Public Property Uri As Uri
Visual Basic (Usage)Copy Code
Dim instance As UriMapping
Dim value As Uri
 
instance.Uri = value
 
value = instance.Uri
C# 
public Uri Uri {get; set;}
Delphi 
public read-write property Uri: Uri; 
JScript 
public function get,set Uri : Uri
Managed Extensions for C++ 
public: __property Uri* get_Uri();
public: __property void set_Uri( 
   Uri* value
);
C++/CLI 
public:
property Uri^ Uri {
   Uri^ get();
   void set (    Uri^ value);
}

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.
XAMLCopy Code
<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>

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.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.