locked
uriMapper RRS feed

  • Question

  • I was following the hair salon lesson 1 module. I am having problems with the urimapper code.It is generating errors. What is the correct code and how do I use the urimapper?
    Tuesday, August 31, 2010 11:29 PM

All replies

  • Could you give us more info on the errors?  What errors are you getting? What isn't working?  What are you trying to do?
    Wednesday, September 1, 2010 2:27 PM
    Moderator
  •  

     

    I was following the hair salon module 9 lesson 1 on design toolbox tutorial. I am trying to make a silverlight website from beginning to end. I am having problems with the urimapper code that the tutorial says to insert. It is generating errors, see below. It gives me a error of "invalid XAML". What is the correct code and how do I use the urimapper? also, is there any other tutorials for creating total silverlight websites? is the customer required to have silverlight installed to view the website once it's published? Any help is appreciated.

    <UserControl
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
     xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
     x:Class="navigation.MainPage"
     Width="640" Height="480">

     <Grid x:Name="LayoutRoot" Background="White">
      <navigation:Frame Margin="11,12,28,33"/>
               <navigation:Frame.UriMapper>
                        <uriMapper:UriMapper>
                            <uriMapper:UriMapping Uri="/{pageName}.xaml"
          MappedUri="/{pageName}.xaml">
          </uriMapper:UriMapping>
                        </uriMapper:UriMapper>
                    </navigation:Frame.UriMapper>

     </Grid>
    </UserControl>

    Thursday, September 2, 2010 12:34 AM
  • This post shows a couple of changes that may need to be made:

    http://social.expression.microsoft.com/Forums/en-US/blend/thread/0c8b01ff-f94e-4a58-a426-2c0073f20713

     

    Do you have a reference in your project to the System.Windows.Controls.Navigation.dll?

     

    Yes, to view a silverlight website, the client machine needs to have silverlight installed. It is like flash in that respect.

    Thursday, September 2, 2010 1:44 PM
    Moderator
  • Also, it would still help if you would post the actual errors you are experiencing.
    Thursday, September 2, 2010 1:59 PM
    Moderator