Setting start page of Windows Phone dynamically through code
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的更多相关文章
- 【转】Setting up SDL on Windows
FROM: http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/index.php Setting up SDL on Windows Last ...
- JRebel Windows RegCreateKeyEx(...) returned error code 5.
作为一个JRebel的深度用户,在win10下用JRebel的eclipse插件使用的时候遇到了如下问题: java.util.prefs.WindowsPreferences <init> ...
- 今天Windows Azure Live to Code的分享
今天参加了微软广州的Live to Code,晚上回公司OT写了封报告E-mail,也没让公司今天白出工资给我... 因为没有涉及到公司机密什么的,所以就拿出来跟大家分享一下. 首先要说明的是,在会议 ...
- SQL Server 2012安装错误案例:Error while enabling Windows feature: NetFx3, Error Code: -2146498298
案例环境: 服务器环境 : Windows Server 2012 R2 Standard 数据库版本 : SQL Server 2012 SP1 案例介绍: 在Windows Ser ...
- 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 ...
- 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 ...
- Windows下visual studio code搭建golang开发环境
Windows下visual studio code搭建golang开发环境 序幕 其实环境搭建没什么难的,但是遇到一些问题,主要是有些网站资源访问不了(如:golang.org),导致一些包无法安装 ...
- 启动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 ...
- 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 ...
随机推荐
- jquery获取radio和select选中值
//jquery 获取radio选中值 <input type="radio" name="c_type" value="a" > ...
- QQ的账号登录及api操作
.qq.php <?php /** * PHP Library for qq.com * * @author */ class qqPHP { function __construct($app ...
- AndroidStudio创建新项目报错
创建新项目自动执行时报错: Failed to import new Gradle project: failed to find Build Tools revision 17.0.0 Consul ...
- hdu 5000 dp **
题目中提到 It guarantees that the sum of T[i] in each test case is no more than 2000 and 1 <= T[i]. 加 ...
- PMP 第二章 项目生命周期与组织
1 项目组织机构类型有哪些? 区别是什么? 职能型 矩阵型 项目性 2 什么是事业环境因素? 什么是组织过程资产? 如何区分事业环境因素和组织过程资产? 事业环境因素:事业环境因素指围绕项目或能影 ...
- unfortunately launcher has stopped
设定虚拟机的配置.
- 深入解析结构化异常处理(SEH)
jpg 改 rar
- 智能车学习(十四)——K60单片机GPIO学习
一.头文件: #ifndef __MK60_GPIO_H__ #define __MK60_GPIO_H__ #include "MK60_gpio_cfg.h" /* * 定义管 ...
- 【转】html、css、js文件加载顺序及执行情况
原链接:http://www.cnblogs.com/Walker-lyl/p/5262075.html 今天看书,看到html,css,js加载执行情况,发现自己并不是真正的了解,网上搜了半小时依然 ...
- Java堆外内存的使用
堆外内存的回收见HeapByteBuffer和DirectByteBuffer以及回收DirectByteBuffer 基本类型长度 在Java中有很多的基本类型,比如: byte,一个字节是8位bi ...