Created
September 27, 2012 08:23
-
-
Save champierre/3792867 to your computer and use it in GitHub Desktop.
replace a button in appbar on windows 8 app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var appbar = document.getElementById("appbar"); | |
var button = document.createElement("button"); | |
button.setAttribute("data-win-control", "WinJS.UI.AppBarCommand"); | |
// id, label, icon are dynamically set. button.setAttribute("type", "button"); | |
button.setAttribute("data-win-options", "{id:'" + id + "', label:'" + label + "', icon:'" + icon + "'}"); | |
WinJS.UI.process(button); appbar.appendChild(button); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment