Skip to content

Instantly share code, notes, and snippets.

View andrewleader's full-sized avatar

Andrew Leader andrewleader

  • Microsoft
View GitHub Profile
@andrewleader
andrewleader / notification.js
Last active March 11, 2016 05:55 — forked from boyofgreen/notification.js
notification inside a Windows 10 app
if (typeof Windows !== 'undefined'&& typeof Windows.UI !== 'undefined' && typeof Windows.UI.Notifications !== 'undefined') {
// Construct the toast notification content
var toastContent = new Windows.Data.Xml.Dom.XmlDocument();
var toast = toastContent.createElement("toast");
toastContent.appendChild(toast);
var visual = toastContent.createElement("visual");
toast.appendChild(visual);
@andrewleader
andrewleader / livetile.js
Last active March 11, 2016 05:42 — forked from boyofgreen/livetile.js
code to push a live tile in Windows 10
if (typeof Windows !== 'undefined' &&
typeof Windows.UI !== 'undefined' &&
typeof Windows.UI.Notifications !== 'undefined') {
// Construct the tile notification content
var tileContent = new Windows.Data.Xml.Dom.XmlDocument();
var tile = tileContent.createElement("tile");
tileContent.appendChild(tile);