All about Programming and Sourcecode

How to change the start page of the Windows Store App using HTML and Javascript ?

When a new Windows 8 App is created using JavaScript and HTML,the Visual Studio 2012 creates the default.html page and sets this page as the startup page of the Windows Store App .

If you want to create a different html page and want to set it as the start page of your Windows 8 App , you can do it by updating the package.appxmanifest file.

How to change the start page of the Windows Store App using HTML and Javascript ?

Although , you can open the package.appxmanifest file in the designer and change the start page of your Windows Store App , here’s we will try to open the package.appxmanifest file in the XML Editor to explore the package.appxmanifest file.

The package.appxmanifest file is a XML format file and contains the following

<?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">

<Identity     Name="bd4bfc97-c5e3-4cac-a53f-a9dc877bd357"     Version="1.0.0.0"     Publisher="CN=SENTHILK" />

<Properties>
<DisplayName>App5</DisplayName>
<PublisherDisplayName>SENTHILK</PublisherDisplayName>
<Logo>images\storelogo.png</Logo>   </Properties>

<Prerequisites>
<OSMinVersion>6.2.1</OSMinVersion>
<OSMaxVersionTested>6.2.1</OSMaxVersionTested>
</Prerequisites>

<Resources>
<Resource Language="x-generate" />   </Resources>

<Applications>
<Application       Id="App"       StartPage="default.html">
<VisualElements DisplayName="App5"  Logo="images\logo.png"  SmallLogo="images\smalllogo.png"   Description="App5"  ForegroundText="light" BackgroundColor="#464646">
<DefaultTile ShowName="allLogos" />
<SplashScreen Image="images\splashscreen.png" />
</VisualElements>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

If you want to change the start page of your Windows 8 App that is being developed using JavaScript and HTML , simply update update the StartPage property defined in the Application tag with the new file name . In this case , replace default.html with the new html file name.

<Application Id="App" StartPage="newPage.html">
0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
 
Comments

Trackbacks for this post

Leave a Reply