Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've made a multi-page website in Silverlight for an art gallery.

I made it in a Silverlight application, not a navigation application, I have been trying to add navigation, by following tutorials online, but none of them work.

I've noticed that all these tutorials are for SL 2 not 4.

They've said this shouldn't make a difference but it still doesn't work, no matter what I do.

Here is the code for the mainpage:
HTML
<usercontrol x:class="LondonArtGallery.MainPage" xmlns:x="#unknown">
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    mc:Ignorable="d"
    d:DesignHeight="589" d:DesignWidth="1037" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <grid x:name="LayoutRoot" removed="#FF5A479A" height="588" width="1037" showgridlines="True">
        <grid.rowdefinitions>
            <rowdefinition height="86*" />
            <rowdefinition height="35*" />
            <rowdefinition height="467*" />
        </grid.rowdefinitions>
        
            <hyperlinkbutton content="Gallery" height="35" horizontalalignment="Left" margin="173,0,0,0" name="btnGallery" navigateuri="/GalleryPage" verticalalignment="Top" width="80" fontsize="16" removed="#FF0D91F8" foreground="#FFE9EFF5" verticalcontentalignment="Center" horizontalcontentalignment="Center" targetname="_parent" click="btnGallery_Click_1" grid.row="1" />

    </grid>

</usercontrol>

I haven't added anything else to the other pages or the cs files.

So can someone guide me through on how to do this?
Posted
Updated 16-Nov-11 1:46am
v3

Silverlight 2 didn't have navigation...

There should be enough information and samples in the documentation to get you started: Navigation Overview[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900