现在的位置: 首页 > 综合 > 正文

改变WindowsPhone7程序的启动Page

2012年01月17日 ⁄ 综合 ⁄ 共 433字 ⁄ 字号 评论关闭

在XAML中使用应用程序定义指定起始Page(它是启动 WindowsPhone7程序时自动加载的Page)。

指定方法是将 StartupUri 属性设置为所需的 Page 的 统一资源标识符 (URI)。

可以在标记中以声明方式设置 StartupUri,如下面的示例所示。


<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="SDKSample.App"
    StartupUri="PageWithHyperlink.xaml" />

 

此例中,StartupUri 特性设置为标识 HomePage.xaml 的相对 pack URI。当WindowsPhone7 APP 启动时,将自动导航到 HomePage.xaml 并显示该文件。

抱歉!评论已关闭.