Skip to content

Instantly share code, notes, and snippets.

@boyofgreen
boyofgreen / backbutton.js
Last active June 9, 2016 15:55
Back Button All code samples
/**here we are generating a back button in the title bar of the app. it doesn't change the page at all as it is above (or below on phone) the app itself. This is a Windows API ***/
//this is the windows apis for the back button as well as an event handleere for it
var systemNavigationManager = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
var systemNavigation = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
@boyofgreen
boyofgreen / livetile.js
Last active March 11, 2016 14:23
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);
@boyofgreen
boyofgreen / notification.js
Last active March 11, 2016 14:22
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);
if (typeof Windows !== 'undefined'&& typeof Windows.Security !== 'undefined' && typeof Windows.Security.Credentials !== 'undefined') {
function UploadCheck() {
var username = "BobBarker" + Math.random();
var keycredentialmanager = Windows.Security.Credentials.KeyCredentialManager;
keycredentialmanager.isSupportedAsync().done(function (result) {
if (result == true) {
var retreivalstatus = keycredentialmanager.openAsync(username).done(function (result) {
@boyofgreen
boyofgreen / ifdef.md
Last active May 8, 2018 20:33
#ifDef Windows Live at Build 2018