Windows Phone 8.1 WinJS Appbar disabled property not working
NickName:Antonio Pared Ask DateTime:2015-06-11T07:18:54

Windows Phone 8.1 WinJS Appbar disabled property not working

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

More about “Windows Phone 8.1 WinJS Appbar disabled property not working” related questions

Windows Phone 8.1 WinJS Appbar disabled property not working

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: &lt;scri...

Show Detail

windows phone8.1 support winjs/javascript as native already?

I'm wondering if the Windows Phone 8.1 SDK supports WinJS? I saw there are some news that windows phone 8.1 start to support WinJS If so, I will move to WinJS for WP and WinRT both. Your comment

Show Detail

Windows 8.1: WinJS: appbar won't open/show by default?

I'm working on a Windows 8.1 app and on a data input page I would like the appBar to be open or visible by default as it contains the option to save the data. http://msdn.microsoft.com/en-us/library/

Show Detail

Does windows phone8.1 sdk support winjs/javascript as native

I used C# develop a WP8 app. I'm wondering if the Windows Phone 8.1 SDK supports WinJS? I saw there are some news that windows phone 8.1 start to support WinJS If so, I will move to WinJS for WP ...

Show Detail

WinJS.UI.Flyout HTML on windows phone 8.1

I am trying to create a WinJS.UI.Flyout with a single input field and a single button to allow the user to enter a new value in the input field and click on the button to save it. However, on windows

Show Detail

Add AppBarCommand to AppBar in WinJS

I need to add an AppBarCommand to an AppBar programmatically. This used to work on Windows 8.1, but it's not working on Windows 10. I receive no errors, but when I execute the below code, my

Show Detail

Howto: Programmatically add AppBarCommand to Windows Phone 8.1 app

I have a Windows Store app that uses the following code to add AppBarCommands and that code does not work on Windows Phone 8.1 function showBars() { var appBar = document.createElement('div');...

Show Detail

Windows Phone 8.1 WinJS Keyboard Page Resize

I am currently writing an app using WinJS with Windows Phone 8.1. The issue I am encountering now, is that whenever a user taps on a login input box the keyboard appears and displaces the page. This

Show Detail

Will WinJS.UI.AppBar work on browsers?

I have used WinJS and it works on Browsers. However, the WinJS site does not have examples for other controls like Win.UI.AppBar that can be used in Win8.1 or Win10. Will WinJS.UI.AppBar work on

Show Detail

How to save an image in Windows Phone 8.1 using WinJS

I am looking to migrate my Windows 8 app to Windows Phone 8.1 using WinJS. I had used picker.pickSaveFileAsync in Windows 8 which is not supported for WP 8.1. I had then referred the official samp...

Show Detail