I'm trying to hide (disable) the appBar so it doesn't show on up a page in my app. However the disabled
property doesn't seem to be working, or my syntax is off. I've tried using it like:
<script>
var disabled = appBar.disabled;
appBar.disabled = disabled;
</script>
and
<script>
var disabled = appBar.disabled;
appBar.disabled = true;
</script>
but the appBar is still visible. On both instances I've placed the script just below the HTML:
<!-- BEGINTEMPLATE: Template code for an app bar -->
<div id="appBar" data-win-control="WinJS.UI.AppBar" data-win-options="{closedDisplayMode:'minimal', disabled: false}">
<button data-win-control="WinJS.UI.AppBarCommand" data-win-options="{id:'cmdAbout', label:'about...', section:'selection'}"></button>
</div>
<!-- ENDTEMPLATE -->
<div id="statusMessage"></div>
<script>
var disabled = appBar.disabled;
appBar.disabled = true;
</script>
What am I doing wrong?
Copyright Notice:Content Author:「Antonio Pared」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30768959/windows-phone-8-1-winjs-appbar-disabled-property-not-working