Essentially this one line of code will set the start page of the application.

 var navTo = new Uri("/Views/MainPage.xaml", UriKind.RelativeOrAbsolute);
((App)Current).RootFrame.Navigate(navTo);

Then you will have to set start page in App.Xaml.cs as below.

 private void Application_Launching(object sender, LaunchingEventArgs e)
{ }

Last thing you need to do is remove entry of default task from WMAppManifest.xml file. If you notice entry for default navigation page is empty.

  <Tasks>
<DefaultTask Name ="_default" NavigationPage=""/>
</Tasks>
<Tokens>
<PrimaryToken TokenID="liveTilesToken" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">Background.png</BackgroundImageURI>
<Count>0</Count>
<Title>liveTiles</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>

Setting start page of Windows Phone dynamically through code的更多相关文章

  1. 【转】Setting up SDL on Windows

    FROM: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/index.php Setting up SDL on Windows Last ...

  2. JRebel Windows RegCreateKeyEx(...) returned error code 5.

    作为一个JRebel的深度用户,在win10下用JRebel的eclipse插件使用的时候遇到了如下问题: java.util.prefs.WindowsPreferences <init> ...

  3. 今天Windows Azure Live to Code的分享

    今天参加了微软广州的Live to Code,晚上回公司OT写了封报告E-mail,也没让公司今天白出工资给我... 因为没有涉及到公司机密什么的,所以就拿出来跟大家分享一下. 首先要说明的是,在会议 ...

  4. SQL Server 2012安装错误案例:Error while enabling Windows feature: NetFx3, Error Code: -2146498298

    案例环境: 服务器环境 :    Windows Server 2012 R2 Standard 数据库版本 :    SQL Server 2012 SP1 案例介绍:   在Windows Ser ...

  5. win8.1中安装sql2014 0x800F0906 【 Error while enabling Windows feature : NetFx3, Error Code : -2146498298 】

    安装sql2012 需要安装net3.5  没有的话 安装不成功 Error while enabling Windows feature : NetFx3, Error Code : -214649 ...

  6. WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5

    以下是我的程序(取自headfirst Java): import javax.sound.midi.*; public class MiniMiniMusicApp { public static ...

  7. Windows下visual studio code搭建golang开发环境

    Windows下visual studio code搭建golang开发环境 序幕 其实环境搭建没什么难的,但是遇到一些问题,主要是有些网站资源访问不了(如:golang.org),导致一些包无法安装 ...

  8. 启动Jmeter4.0 后弹出警告: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0 x80000002. Windows RegCreateKeyEx(...) returned error code 5.

    启动Jmeter4.0 后弹出命令窗口提示信息: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at r ...

  9. Jmeter--报错 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

    今天要用Jmeter测试服务器性能,发现GUI界面总是有warning提示: WARNING: Could not open/create prefs root node Software\JavaS ...

随机推荐

  1. android 入门-动画与容器

    set 动画容器 可作为资源id添加R.anim.xxxx   可用于在样式表中添加  http://blog.csdn.net/liuhe688/article/details/6660823 in ...

  2. Linux SSH远程文件/目录传输命令scp

    转载地址:http://www.vpser.net/manage/scp.html 相信各位VPSer在使用VPS时会经常在不同VPS间互相备份数据或者转移数据,大部分情况下VPS上都已经安装了Ngi ...

  3. Sublime Text 3 安装Go语言相关插件gosublime

    1.打开Sublime Text,使用快捷键 ctrl+` (左上角Tab键上方,Esc键下方)或者使用菜单 View > Show Console menu,此时将出现Sublime Text ...

  4. Boost练习程序(multi_index_container)

    代码来自:http://blog.csdn.net/whuqin/article/details/8482547 该容器能实现多列索引,挺好. #include <string> #inc ...

  5. ios调用系统导航

    #import "ViewController.h" #import <MapKit/MapKit.h> @interface ViewController () @p ...

  6. bzoj专题训练

    //http://blog.csdn.net/PoPoQQQ/article/category/2542243

  7. 【java IO】使用Java输入输出流 读取txt文件内数据,进行拼接后写入到另一个文件中

    package com.sxd.test.util; import java.io.BufferedReader; import java.io.BufferedWriter; import java ...

  8. phpexecel 导入导出,格式

    1.日期时间合并到c中 =a1 &b1 或 =a1 + b1 这些都是运算符 2.此时c1的值是这条公式,而并不是公式运算的结果 复制c,粘贴到d,选择粘贴值 3.此时c是时间日期格式的,如需 ...

  9. Loadrunner的字符串函数

    String Function包括 lr_advance_param 指向参数文件中参数的下一个值. lr_convert_string_encoding 将字符串转换为其他编码. lr_decryp ...

  10. AngularJS 验证

    AngularJS ng-model 指令用于绑定输入元素到模型中. 模型对象有两个属性: user 和 email. 我们使用了 ng-show指令, color:red 在邮件是 $dirty 或 ...