Silverlight 3 URI Routing using UriMapper


The navigation routes are read top down so you can still have explicit (or additional) routes in addition to the default.  So given:

   1: ...
   2: <navcore:UriMapper x:Key="uriMapper">
   3:     <navcore:UriMapping Uri="About-Us" MappedUri="/Views/AboutPage.xaml" />
   4:     <navcore:UriMapping Uri="History" MappedUri="/Views/AboutPage.xaml" />
   5:     <navcore:UriMapping Uri="{}{page}" MappedUri="/Views/{page}.xaml" />
   6: </navcore:UriMapper>
   7: ...

A request to About-Us, History or About would navigate to /Views/AboutPage.xaml regardless.  This provides you some flexibility and granularity in your implementation and also provides additional SEO points for your content.

Via Silverlight 3: Navigation URI Routing


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s