winjs

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

流过昼夜 提交于 2019-12-06 14:08:20
问题 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. 回答1: you can use WinRT API to do that : Windows

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

一个人想着一个人 提交于 2019-12-06 09:13:38
问题 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

使用javascript开发windows phone应用的相关问题

邮差的信 提交于 2019-12-06 09:04:55
1、使用angularjs和winjs时的兼容问题 1、开启scp模式 <html ng-app="app" ng-csp><!-- Enables CSP (Content Security Policy) support --> 2、使用winjs提供的垫片文件 使在winjs内无法使用innerHTML、innerText等技术的jquery、angularjs能够正常工作 <!-- 安全模式shim,为了使用angular和jquery --> <script src="/js/winstore-jscompat.js"></script> 需要将此js放在第一个加载 github地址: https://github.com/MSOpenTech/winstore-jscompat 2、javascript开发windows phone程序无法完全退出的问题 在wp系统里,程序开启后都会在后台运行,一般用js开发的程序,按了返回键,程序就退到后台 除非用户强制关闭,不然程序会一直在后台待命 我个人不太习惯这样的情况,更喜欢退出后程序就完全关闭的,这样子机子又省点内存了(程序员有木有??) 方法一、使程序崩溃退出 1、throw new Error(); 2、window.MSApp.terminateApp(new Error(1, 'exit'));

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

℡╲_俬逩灬. 提交于 2019-12-06 08:59:38
问题 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

Display a 'loading' image till loading original images in 'image gallery app' - metro style

不羁岁月 提交于 2019-12-06 07:26:57
I am developing an image gallery application .. Its loading images from the internet.. What i am doing is collecting image url into an array and bind it into a list view .. Its works fine.. But my problem is the images shows a cross mark ( 'X') till loading the images. What i am expecting is Display a loading image for each emage untill loads the original image if 1 is not possible, how can i remove the cross mark? You cannot remove the 'X' mark as that is a browser-specific feature. You could, however, set your images to have a background image of your loading image. simple example: <img src=

Couldn't find the required information in the lock file. Make sure you have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets

我怕爱的太早我们不能终老 提交于 2019-12-06 04:25:06
I'm working on a Windows 10 universal app. The aim was to have a JS front end connecting to a C# library for the heavy lifting. Though when I add the reference and trey to compile I get the following error Couldn't find the required information in the lock file. Make sure you have .NETCore,Version=v5.0/win10-anycpu mentioned in your targets. I've looked around and in a few cases the solution has been to update Visual Studio and the NuGet packages which I have done. Any suggestions would be great, Thanks Just change build configuration to x86 or ARM and it should work. Any CPU is not supported

Is it possible to use Firebase with a Windows 8 app?

半腔热情 提交于 2019-12-06 03:07:35
I'm hoping to use Firebase in my Windows 8 app made using WinJS. Here is how I am trying to write to the root of my Firebase: var dataRef = new Firebase("https://<firbaseName>.firebaseio.com"); dataRef.set("I am now writing data into Firebase!"); However, this gives me the following error in the JavaScript console: Can’t load <https://<firebaseName>.firebaseio.com/.lp?start=t&ser=66595697&cb=2&v=5>. An app can’t load remote web content in the local context. I've tried to add https://[firebaseName].firebaseio.com/* to my Content URIs in my app manifest but that doesn't seem to be the solution.

How to give a “Empty ListView Message” when there is no data source

只愿长相守 提交于 2019-12-06 01:23:13
问题 My application have a ListView with GridLayout. I am now trying to introduce ListView groups into my application. Say, the data source would usually have Group1, Group2 and Group3. I would like to display all 3 groups all the time regardless there is element in it or not. When there is no element in a group, I want to display a "empty group" message under the group title. I think the default way that WinRT handles it is not to display the empty group and it makes a lot of sense in many

Sending multiple parameters to WinJS.Binding.converter() function

半腔热情 提交于 2019-12-06 00:50:39
Is there a way to send more than one parameter to a WinJS.Binding.converter() function? Consider the following data and output: { contactName: "Tara Miller", mainNumber: "555-405-6190", alternateNumber: "555-209-1927" }, { contactName: "Bryan Bond", alternateNumber: "555-574-4270" }, { contactName: "Jenna Siever", mainNumber: "555-843-8823", alternateNumber: "555-799-5424" }, Here is the HTML. The MyData.chooseBestNumber converter function is used to display either a person's main phone number or the words "no main number" if they don't have a main number: <div id="listViewTemplate" data-win

How can I load remote content in a WinJS iframe whilst avoiding SEC7117 errors?

百般思念 提交于 2019-12-05 23:08:53
I'm trying to port an existing web app to Windows Phone 8.1 (and later, to Windows 8.1). This is not static content, this is a dynamic page with loads of client-side functionality. My default.html file has <iframe src="https://remote.example.com/app.html"></iframe> . The content in the iframe works in the emulator, and resources that are directly referenced in that initial HTML seems to work. However, my web app but triggers several errors like this: SEC7117: Network request to https://cdn.remote.example.com/extra.js did not succeed. Your application manifest does not declare the following