Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added new test app for Windows 8 Navigation project

  • Loading branch information...
commit 471f82199a976d64fe917f44139a521287189f42 1 parent f923b57
@gergob authored
View
46 NavigationJS/NavigationJS.sln
@@ -0,0 +1,46 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2012 for Windows 8
+Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "NavigationJS", "NavigationJS\NavigationJS.jsproj", "{484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|ARM.ActiveCfg = Debug|ARM
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|ARM.Build.0 = Debug|ARM
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|ARM.Deploy.0 = Debug|ARM
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|x64.ActiveCfg = Debug|x64
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|x64.Build.0 = Debug|x64
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|x64.Deploy.0 = Debug|x64
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|x86.ActiveCfg = Debug|x86
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|x86.Build.0 = Debug|x86
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Debug|x86.Deploy.0 = Debug|x86
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|ARM.ActiveCfg = Release|ARM
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|ARM.Build.0 = Release|ARM
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|ARM.Deploy.0 = Release|ARM
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|x64.ActiveCfg = Release|x64
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|x64.Build.0 = Release|x64
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|x64.Deploy.0 = Release|x64
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|x86.ActiveCfg = Release|x86
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|x86.Build.0 = Release|x86
+ {484E78D0-EA8F-4E3D-B876-0D95F0CCE8F3}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
88 NavigationJS/NavigationJS/NavigationJS.jsproj
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|AnyCPU">
+ <Configuration>Debug</Configuration>
+ <Platform>AnyCPU</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x86">
+ <Configuration>Debug</Configuration>
+ <Platform>x86</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|AnyCPU">
+ <Configuration>Release</Configuration>
+ <Platform>AnyCPU</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x86">
+ <Configuration>Release</Configuration>
+ <Platform>x86</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>484e78d0-ea8f-4e3d-b876-0d95f0cce8f3</ProjectGuid>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">
+ <VisualStudioVersion>11.0</VisualStudioVersion>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
+ <PropertyGroup>
+ <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
+ <TargetPlatformVersion>8.0</TargetPlatformVersion>
+ <DefaultLanguage>en-US</DefaultLanguage>
+
+ <PackageCertificateKeyFile>NavigationJS_TemporaryKey.pfx</PackageCertificateKeyFile>
+
+ </PropertyGroup>
+ <ItemGroup>
+ <AppxManifest Include="package.appxmanifest">
+ <SubType>Designer</SubType>
+ </AppxManifest>
+ <Content Include="css\default.css" />
+ <Content Include="images\logo.png" />
+ <Content Include="images\smalllogo.png" />
+ <Content Include="images\splashscreen.png" />
+ <Content Include="images\storelogo.png" />
+ <Content Include="js\default.js" />
+ <Content Include="js\navigator.js" />
+ <Content Include="pages\home\home.css" />
+ <Content Include="pages\home\home.html" />
+ <Content Include="pages\home\home.js" />
+ <Content Include="default.html" />
+
+ <None Include="NavigationJS_TemporaryKey.pfx" />
+
+ </ItemGroup>
+ <ItemGroup>
+ <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
+ <!-- To modify your build process, add your task inside one of the targets below then uncomment
+ that target and the DisableFastUpToDateCheck PropertyGroup.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ <PropertyGroup>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ </PropertyGroup>
+ -->
+</Project>
View
BIN  NavigationJS/NavigationJS/NavigationJS_TemporaryKey.pfx
Binary file not shown
View
73 NavigationJS/NavigationJS/css/default.css
@@ -0,0 +1,73 @@
+#contenthost {
+ height: 100%;
+ width: 100%;
+}
+
+.fragment {
+ /* Define a grid with rows for a banner and a body */
+ -ms-grid-columns: 1fr;
+ -ms-grid-rows: 128px 1fr;
+ display: -ms-grid;
+ height: 100%;
+ width: 100%;
+}
+
+ .fragment header[role=banner] {
+ /* Define a grid with columns for the back button and page title. */
+ -ms-grid-columns: 120px 1fr;
+ -ms-grid-rows: 1fr;
+ display: -ms-grid;
+ }
+
+ .fragment header[role=banner] .win-backbutton {
+ margin-left: 39px;
+ margin-top: 59px;
+ }
+
+ .fragment header[role=banner] .titlearea {
+ -ms-grid-column: 2;
+ margin-top: 37px;
+ }
+
+ .fragment header[role=banner] .titlearea .pagetitle {
+ width: calc(100% - 20px);
+ }
+
+ .fragment section[role=main] {
+ -ms-grid-row: 2;
+ height: 100%;
+ width: 100%;
+ }
+
+@media screen and (-ms-view-state: snapped) {
+ .fragment header[role=banner] {
+ -ms-grid-columns: auto 1fr;
+ margin-left: 20px;
+ }
+
+ .fragment header[role=banner] .win-backbutton {
+ margin: 0;
+ margin-right: 10px;
+ margin-top: 76px;
+ }
+
+ .fragment header[role=banner] .win-backbutton:disabled {
+ display: none;
+ }
+
+ .fragment header[role=banner] .titlearea {
+ -ms-grid-column: 2;
+ margin-left: 0;
+ margin-top: 68px;
+ }
+}
+
+@media screen and (-ms-view-state: fullscreen-portrait) {
+ .fragment header[role=banner] {
+ -ms-grid-columns: 100px 1fr;
+ }
+
+ .fragment header[role=banner] .win-backbutton {
+ margin-left: 29px;
+ }
+}
View
23 NavigationJS/NavigationJS/default.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>NavigationJS</title>
+
+ <!-- WinJS references -->
+ <link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" />
+ <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
+ <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>
+
+ <!-- NavigationJS references -->
+ <link href="/css/default.css" rel="stylesheet" />
+ <script src="/js/default.js"></script>
+ <script src="/js/navigator.js"></script>
+</head>
+<body>
+ <div id="contenthost" data-win-control="Application.PageControlNavigator" data-win-options="{home: '/pages/home/home.html'}"></div>
+ <!-- <div id="appbar" data-win-control="WinJS.UI.AppBar">
+ <button data-win-control="WinJS.UI.AppBarCommand" data-win-options="{id:'cmd', label:'Command', icon:'placeholder'}" type="button"></button>
+ </div> -->
+</body>
+</html>
View
BIN  NavigationJS/NavigationJS/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NavigationJS/NavigationJS/images/smalllogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NavigationJS/NavigationJS/images/splashscreen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  NavigationJS/NavigationJS/images/storelogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
45 NavigationJS/NavigationJS/js/default.js
@@ -0,0 +1,45 @@
+// For an introduction to the Navigation template, see the following documentation:
+// http://go.microsoft.com/fwlink/?LinkId=232506
+(function () {
+ "use strict";
+
+ WinJS.Binding.optimizeBindingReferences = true;
+
+ var app = WinJS.Application;
+ var activation = Windows.ApplicationModel.Activation;
+ var nav = WinJS.Navigation;
+
+ app.addEventListener("activated", function (args) {
+ if (args.detail.kind === activation.ActivationKind.launch) {
+ if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
+ // TODO: This application has been newly launched. Initialize
+ // your application here.
+ } else {
+ // TODO: This application has been reactivated from suspension.
+ // Restore application state here.
+ }
+
+ if (app.sessionState.history) {
+ nav.history = app.sessionState.history;
+ }
+ args.setPromise(WinJS.UI.processAll().then(function () {
+ if (nav.location) {
+ nav.history.current.initialPlaceholder = true;
+ return nav.navigate(nav.location, nav.state);
+ } else {
+ return nav.navigate(Application.navigator.home);
+ }
+ }));
+ }
+ });
+
+ app.oncheckpoint = function (args) {
+ // TODO: This application is about to be suspended. Save any state
+ // that needs to persist across suspensions here. If you need to
+ // complete an asynchronous operation before your application is
+ // suspended, call args.setPromise().
+ app.sessionState.history = nav.history;
+ };
+
+ app.start();
+})();
View
139 NavigationJS/NavigationJS/js/navigator.js
@@ -0,0 +1,139 @@
+(function () {
+ "use strict";
+
+ var appView = Windows.UI.ViewManagement.ApplicationView;
+ var nav = WinJS.Navigation;
+
+ WinJS.Namespace.define("Application", {
+ PageControlNavigator: WinJS.Class.define(
+ // Define the constructor function for the PageControlNavigator.
+ function PageControlNavigator(element, options) {
+ this._element = element || document.createElement("div");
+ this._element.appendChild(this._createPageElement());
+
+ this.home = options.home;
+ this._lastViewstate = appView.value;
+
+ nav.onnavigated = this._navigated.bind(this);
+ window.onresize = this._resized.bind(this);
+
+ document.body.onkeyup = this._keyupHandler.bind(this);
+ document.body.onkeypress = this._keypressHandler.bind(this);
+ document.body.onmspointerup = this._mspointerupHandler.bind(this);
+
+ Application.navigator = this;
+ }, {
+ home: "",
+ /// <field domElement="true" />
+ _element: null,
+ _lastNavigationPromise: WinJS.Promise.as(),
+ _lastViewstate: 0,
+
+ // This is the currently loaded Page object.
+ pageControl: {
+ get: function () { return this.pageElement && this.pageElement.winControl; }
+ },
+
+ // This is the root element of the current page.
+ pageElement: {
+ get: function () { return this._element.firstElementChild; }
+ },
+
+ // Creates a container for a new page to be loaded into.
+ _createPageElement: function () {
+ var element = document.createElement("div");
+ element.style.width = "100%";
+ element.style.height = "100%";
+ return element;
+ },
+
+ // Retrieves a list of animation elements for the current page.
+ // If the page does not define a list, animate the entire page.
+ _getAnimationElements: function () {
+ if (this.pageControl && this.pageControl.getAnimationElements) {
+ return this.pageControl.getAnimationElements();
+ }
+ return this.pageElement;
+ },
+
+ // Navigates back whenever the backspace key is pressed and
+ // not captured by an input field.
+ _keypressHandler: function (args) {
+ if (args.key === "Backspace") {
+ nav.back();
+ }
+ },
+
+ // Navigates back or forward when alt + left or alt + right
+ // key combinations are pressed.
+ _keyupHandler: function (args) {
+ if ((args.key === "Left" && args.altKey) || (args.key === "BrowserBack")) {
+ nav.back();
+ } else if ((args.key === "Right" && args.altKey) || (args.key === "BrowserForward")) {
+ nav.forward();
+ }
+ },
+
+ // This function responds to clicks to enable navigation using
+ // back and forward mouse buttons.
+ _mspointerupHandler: function (args) {
+ if (args.button === 3) {
+ nav.back();
+ } else if (args.button === 4) {
+ nav.forward();
+ }
+ },
+
+ // Responds to navigation by adding new pages to the DOM.
+ _navigated: function (args) {
+ var newElement = this._createPageElement();
+ var parentedComplete;
+ var parented = new WinJS.Promise(function (c) { parentedComplete = c; });
+
+ this._lastNavigationPromise.cancel();
+
+ this._lastNavigationPromise = WinJS.Promise.timeout().then(function () {
+ return WinJS.UI.Pages.render(args.detail.location, newElement, args.detail.state, parented);
+ }).then(function parentElement(control) {
+ var oldElement = this.pageElement;
+ if (oldElement.winControl && oldElement.winControl.unload) {
+ oldElement.winControl.unload();
+ }
+ this._element.appendChild(newElement);
+ this._element.removeChild(oldElement);
+ oldElement.innerText = "";
+ this._updateBackButton();
+ parentedComplete();
+ WinJS.UI.Animation.enterPage(this._getAnimationElements()).done();
+ }.bind(this));
+
+ args.detail.setPromise(this._lastNavigationPromise);
+ },
+
+ // Responds to resize events and call the updateLayout function
+ // on the currently loaded page.
+ _resized: function (args) {
+ if (this.pageControl && this.pageControl.updateLayout) {
+ this.pageControl.updateLayout.call(this.pageControl, this.pageElement, appView.value, this._lastViewstate);
+ }
+ this._lastViewstate = appView.value;
+ },
+
+ // Updates the back button state. Called after navigation has
+ // completed.
+ _updateBackButton: function () {
+ var backButton = this.pageElement.querySelector("header[role=banner] .win-backbutton");
+ if (backButton) {
+ backButton.onclick = function () { nav.back(); };
+
+ if (nav.canGoBack) {
+ backButton.removeAttribute("disabled");
+ } else {
+ backButton.setAttribute("disabled", "disabled");
+ }
+ }
+ },
+ }
+ )
+ });
+})();
View
48 NavigationJS/NavigationJS/package.appxmanifest
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
+
+ <Identity
+ Name="484e78d0-ea8f-4e3d-b876-0d95f0cce8f3"
+ Version="1.0.0.0"
+ Publisher="CN=Gergo" />
+
+ <Properties>
+ <DisplayName>NavigationJS</DisplayName>
+ <PublisherDisplayName>Gergo</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="NavigationJS"
+ Logo="images\logo.png"
+ SmallLogo="images\smalllogo.png"
+ Description="NavigationJS"
+ ForegroundText="light"
+ BackgroundColor="#464646">
+
+ <DefaultTile ShowName="allLogos" />
+ <SplashScreen Image="images\splashscreen.png" />
+
+ </VisualElements>
+ </Application>
+ </Applications>
+
+ <Capabilities>
+ <Capability Name="internetClient" />
+ </Capabilities>
+
+</Package>
View
21 NavigationJS/NavigationJS/pages/home/home.css
@@ -0,0 +1,21 @@
+
+#greetingOutput {
+ height: 20px;
+ margin-bottom: 40px;
+}
+
+.homepage section[role=main] {
+ margin-left: 120px;
+}
+
+@media screen and (-ms-view-state: snapped) {
+ .homepage section[role=main] {
+ margin-left: 20px;
+ }
+}
+
+@media screen and (-ms-view-state: portrait) {
+ .homepage section[role=main] {
+ margin-left: 100px;
+ }
+}
View
44 NavigationJS/NavigationJS/pages/home/home.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>homePage</title>
+
+ <!-- WinJS references -->
+ <link href="//Microsoft.WinJS.1.0/css/ui-light.css" rel="stylesheet" />
+ <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
+ <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>
+
+ <link href="/css/default.css" rel="stylesheet" />
+ <link href="/pages/home/home.css" rel="stylesheet" />
+ <script src="/pages/home/home.js"></script>
+</head>
+<body>
+ <!-- The content that will be loaded and displayed. -->
+ <div class="fragment homepage">
+ <header aria-label="Header content" role="banner">
+ <button class="win-backbutton" aria-label="Back" disabled type="button"></button>
+ <h1 class="titlearea win-type-ellipsis">
+ <span class="pagetitle">Welcome to NavigationJS!</span>
+ </h1>
+ </header>
+ <section aria-label="Main content" role="main">
+
+ <h2>Hello Windows 8!</h2>
+ <div>
+ <p>What is your name?</p>
+ <input id="txtName" type="text" />
+ <button id="btnHello">Say Hello...</button>
+ <div id="divGreeting">
+
+ </div>
+ <label for="ratingControl">Rate this greeting</label>
+ <div id="ratingControl" data-win-control="WinJS.UI.Rating"></div>
+ <div id="ratingOutput"></div>
+
+ </div>
+
+ </section>
+ </div>
+</body>
+</html>
View
51 NavigationJS/NavigationJS/pages/home/home.js
@@ -0,0 +1,51 @@
+(function () {
+ "use strict";
+
+ WinJS.UI.Pages.define("/pages/home/home.html", {
+ // This function is called whenever a user navigates to this page. It
+ // populates the page elements with the app's data.
+ ready: function (element, options) {
+ // TODO: Initialize the page here.
+
+ var buttonHello = document.getElementById("btnHello");
+ buttonHello.addEventListener("click", this.buttonClickHandler, false);
+
+ var ratingDiv = document.getElementById("ratingControl");
+ var ratingControl = ratingDiv.winControl;
+ if (ratingControl) {
+ ratingControl.addEventListener("change", this.ratingChanged, false);
+ }
+
+ //restore data
+ var localSettings = Windows.Storage.ApplicationData.current.localSettings;
+ if (localSettings) {
+ var userName = localSettings.values["userName"];
+ document.getElementById("txtName").value = userName;
+ var greetingRating = localSettings.values["greetingRating"];
+ document.getElementById("ratingOutput").innerText = greetingRating;
+ }
+ },
+
+ buttonClickHandler: function (eventInfo) {
+ var userName = document.getElementById("txtName").value;
+ var greetingMessage = "Welcome " + userName + " !!!";
+ document.getElementById("divGreeting").innerText = greetingMessage;
+
+ //save the data to the session
+ Windows.Storage.ApplicationData.current.localSettings.values["greetingInput"] = greetingMessage;
+ Windows.Storage.ApplicationData.current.localSettings.values["userName"] = userName;
+ },
+
+ ratingChanged: function (evenInfo) {
+ var newGreetingValue = evenInfo.detail.tentativeRating;
+ document.getElementById("ratingOutput").innerText = newGreetingValue;
+
+ //store data to session
+ var appData = Windows.Storage.ApplicationData.current;
+ var localSettings = appData.localSettings;
+
+ localSettings.values["greetingRating"] = newGreetingValue;
+
+ }
+ });
+})();
Please sign in to comment.
Something went wrong with that request. Please try again.