如何在Silverlight 4中在多个页面之间导航 [英] How do you navigate between multiple pages in silverlight 4

查看:82
本文介绍了如何在Silverlight 4中在多个页面之间导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Silverlight中建立了一个多页的美术馆网站.

我是在Silverlight应用程序中完成的,而不是在导航应用程序中完成的,我一直在尝试通过遵循在线教程来添加导航,但是它们都没有用.

我注意到所有这些教程都是针对SL 2而不是4.

他们说这不应该有所作为,但是不管我做什么,它仍然行不通.

这是主页的代码:

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:

<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>


我没有在其他页面或CS文件中添加任何其他内容.

有人可以指导我完成操作吗?


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?

推荐答案

http://stuff.seans.com/2010/05/07/silverlight-4-project-types-part-ii-%E2%80%93-silverlight-navigation-application/[^]




it should be help for you...


Silverlight 2没有导航功能...

文档中应该有足够的信息和示例来帮助您入门:
导航概述 [ ^ ]
Silverlight 2 didn''t have navigation...

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


这篇关于如何在Silverlight 4中在多个页面之间导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆