winjs

Where is ms-appdata?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 19:16:50
I am building a modern ui app and want to, with a batch file, write and periodically update data accessible though the ms-appdata:// protocol in my winjs app. I have the batch file to copy folders, but I cannot find the file path of the appdata. What is the default filepath for App1 's appdata and how can I force my app to create the folder? ms-appdata:///[local | roaming | temp]/ maps to the StorageFolder returned from Windows.Storage.ApplicationData.Current.localFolder, roamingFolder, and temporaryFolder. See https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage

How to Form POST to Paypal from WinJS iframe Windows 8 App?

☆樱花仙子☆ 提交于 2019-12-05 11:03:44
I have a Windows 8 App using Javascript/HTML and within an iframe I have a Paypal form: <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="on0" value="Pages"> <select name="os0"> <option value="10">$1.95</option> <option value="25">$2.95</option> </select> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="encrypted" value="[removed]"> <input type="image" src="/btn_buynow_LG.gif" border="0" name="submit" alt=""> </form> This form works perfectly fine in

Remove X button in input - Metro

时光怂恿深爱的人放手 提交于 2019-12-05 06:21:09
问题 I write a Metro program in Javascript. The problem is Windows8 automatically adds an X button to it. Now how to edit or remove that button? Below is my layout, the X button overlaps the email input. 回答1: Details are here: http://msdn.microsoft.com/en-us/library/windows/apps/hh465498.aspx You need to use the -ms-clear pseudo element, and style it either as you need it, or display none it: input::-ms-clear { display: none; } Note that you likely want to not display none it, since this removes

Avoiding memory leaks winjs EventListeners

≯℡__Kan透↙ 提交于 2019-12-05 05:49:52
问题 I want to know if I add an event listener to a button, do I have to remove it on unload ? Would pressing the 'back' button automatic removes everything current page elements in which I don't need to worry about memory leaks? (function () { "use strict"; ui.Pages.define("/pages/registraton/registraton.html",{ ready: function (element, options) { document.getElementById("submitRegister").addEventListener( "click", postRegistration , false); }, unload: function () { document.getElementById(

How to detect if the surface keyboard is attached?

百般思念 提交于 2019-12-04 22:51:17
问题 I need to implement certain functions only when the keyboard is attached to the surface. Is there a way I can detect when the surface keyboard is attached or removed ? I tried this code on Surface: function getKeyboardCapabilities() { var keyboardCapabilities = new Windows.Devices.Input.KeyboardCapabilities(); console.log(keyboardCapabilities.keyboardPresent); } The result was always '1' even when the keyboard was not connected. 回答1: I used this code to identify when a keyboard is connected

How to get the system accent color for UWP-Apps?

混江龙づ霸主 提交于 2019-12-04 21:36:37
I'm trying to get the Accent Color of a user in a UWP-App for Windows 10. I know how to get it in C#, but I develop my apps in WinJS. So does anyone knows the WinJS equivalent for var color = (Color)Application.Current.Resources["SystemAccentColor"]; ? It would also be nice, if I could Access this Color with CSS. I found some hints, that color: Highlight; would be the solution, but this gives me only a blue and not the Accent Color. Thanks alot. you can use WinRT API to do that : Windows.UI.ViewManagement.UIColorType enumeration provides all accents colors. You can make something like : var

Binding multiple HTML properties using WinJS?

喜夏-厌秋 提交于 2019-12-04 18:45:31
WinJS allows you to bind HTML properties dynamically at run-time, similar to XAML binding. <div id="itemTemplate" data-win-control="WinJS.Binding.Template"...> <h3 data-win-bind="innerText: timestamp"></h3> </div> How if I want to also bind the font color style for <h3> as well, how do I achieve that? Unlike the data-win-options binding which makes use of {key:value,key2:value2} syntax. data-win-binding uses a syntax similar to inline-css styles. Using property:bindingValue;property2:bindingValue2 etc will allow you bind multiple properties to the same HTML control. As an example to answer the

Where Can I Download Microsoft.Phone.WinJS.2.1?

血红的双手。 提交于 2019-12-04 14:52:21
I'm trying to make a universal Windows App with WinJS. I've downloaded the latest update to VS2013. The RC version. I've installed all the SDKs I can find. I've installed the WinLibJS_VSE.exe extension, as well. Funny thing about that one is that VS updates keeps saying that I didn't... When I open up any of the sample universal WinJS apps - like the ones here http://code.msdn.microsoft.com/wpapps/Universal-Windows-app-cb3248c3 - I always end up with this error: Could not find SDK "Microsoft.Phone.WinJS.2.1, Version=1.0". C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion

WinJS, return a promise from a function which may or may not be async

送分小仙女□ 提交于 2019-12-04 11:51:27
I have a situation where my WinJS app wants to call a function which may or may not be async (e.g. in one situation I need to load some data from a file (async) but at other times I can load from a cache syncronously). Having a look through the docs I though I could wrap the conditional logic in a promise like: A) return new WinJS.Promise(function() { // mystuff }); or possibly use 'as' like this: B) return WinJS.Promise.as(function() { // mystuff }); The problem is that when I call this function, which I'm doing from the ready() function of my first page like this: WinJS.UI.Pages.define("

Windows Phone 8.1 HTML Company Apps - Can't install company app

会有一股神秘感。 提交于 2019-12-04 09:13:46
问题 I'm having problems trying to deploy any kind of HTML application for Windows Phone 8.1 as a Company App. The application I have developed is using a Visual Studio Apache Cordova Apps project, but I've also tested a manually created .appx , a Blank App (Universal Windows 8.1) and a Blank App (Windows Phone)... the last two seem to effectively be the same project type, the Universal one is just in a Solution with a Windows 8.1 project in as well. I always get the error message detailed below