WinJSContrib.Settings.WhatsNew (NuGet package)

This package add a what's new window that will pop out at start up or through the settings panel

The screen must be registered through the "settings" application event.
If you don't have one, add the following to your default.js

app.addEventListener("settings", function (e) {
  e.detail.applicationcommands = {
    "whatsNewSettingsFlyout": { href: '/pages/settings/whatsnew/whatsnew.html', title: "What's new ?" }
  };
  WinJS.UI.SettingsFlyout.populateSettings(e);        
});


If you want this screen to popup at application start up, you must add the following control in default.html
<div id="ratecontr" data-win-control="MCNEXT.UI.WhatsNewControl" data-win-options="{nbLaunch:20}"></div>


You will also have to call:
var ratecontr = document.getElementById('ratecontr');
ratecontr.winControl.check();


The best place to make this check is in default.js, in the "activated" event, after the first page has been loaded. For example :

WinJS.Navigation.navigate("/pages/home/home.html").done(function(){
  var ratecontr = document.getElementById('ratecontr');
  ratecontr.winControl.check();
});

Last edited Mar 18, 2014 at 12:14 PM by gleborgne, version 1