winjs

How do I put a WinJS.UI.Menu inside of a win-splitview-content section?

断了今生、忘了曾经 提交于 2019-12-13 08:42:55
问题 I have a very simple app. I started with the WinJS App (Universal Windows) template in VS2015. I have a split view and inside the split view content section I have a menu. The menu appears when the control button is clicked but none of the options are selectable. <div data-win-control="WinJS.UI.SplitView" data-win-options="{closedDisplayMode: 'overlay',panePlacement:'left'}"> <div class="win-splitview-pane"> </div> <div class="win-splitview-content"> <button id="selectionButton">Selection<

apply downloaded CSS on windows 8 metroUI app

时间秒杀一切 提交于 2019-12-13 06:04:52
问题 I have to download CSS file and apply style sheet to my app. I downloaded this file at the local folder and referenced it as style.href = "ms-appdata:///local/css//custom.css"; and appended to head as document.getElementsByTagName('head')[0].appendChild(style); after document onready event. Seems it has no effect (but I can see this element in the dom browser). So is there any restriction for css source: app package, local folder? May be this impossible to reference downloaded CSS due to MS

WP8.1 WinJS application crashes when launched from toast notification

吃可爱长大的小学妹 提交于 2019-12-13 05:23:20
问题 I am developing WP8.1 app with WinJS. I am using push notifications. I want to execute a logic depending on "launch" string received in push notification payload. My toast notification payload is <toast launch='launchString'> <visual> <binding template='ToastText02'> <text id='1'>headlineText</text> <text id='2'>bodyText</text> </binding> </visual> </toast> I have registered an event WinJS.Application.addEventListener("activated", this.onActivated); Which is defined as onActivated: function

Passing UI elements to and from Windows Runtime Component in different environments?

微笑、不失礼 提交于 2019-12-13 03:55:28
问题 I wonder if there is a way to create a runtime component (written in C# for example) which allows working with UI elements from different environments. For example I would like to append an UI element such as MediaElement to a given Panel (C#) or div (Javascript). Can I call a method in a runtime component like this: cmpt.setPlayer((Panel) playerParent); (C#) and cmpt.setPlayer(getElementByClass('.playerParent')); (Javascript). Is this possible somehow? If not (and I would totally understand

Why is WInJS included automatically when targeting Windows 8 in Cordova?

梦想的初衷 提交于 2019-12-13 01:31:30
问题 We're developing an app using AngularJS, and when we're targeting Windows 8 I noticed that the generated Visual Studio project included WinJS as a reference. Since we're not using WinJS I simply removed the reference from the project. Then I noticed that removing WinJS caused benign script load errors in the console when running the app. Further investigation showed that cordova.js automatically checks for WinJS, and if not included tries to include it (!). Here's the relevant code: var

Nested Repeaters Using Table Tags

戏子无情 提交于 2019-12-12 20:31:46
问题 I am using the following code to try and use nested repeaters in WinJS: <table class="grid" id="rptCustomerHistory" data-win-control="WinJS.UI.Repeater"> <thead> <tr> <th colspan="4" class="groupHeader" data-win-bind="textContent: GroupDate.DateTime BindingConverter.toYearMonthDate"></th> </tr> </thead> <tbody data-win-control="WinJS.UI.Repeater" data-win-bind="winControl.data: ch"> <tr> <td data-win-bind="textContent: ContactDate.DateTime BindingConverter.toshortdate"></td> <td data-win-bind

how to load image on webview from ms-appdata:///local

雨燕双飞 提交于 2019-12-12 19:58:37
问题 I'm developing windows store apps with html5/javascript. I have to load image from src " ms-appdata://local/testimage.png" to webview.I can't able to load the image using this src on navigateToString method. Any help would be greatly appreciated 回答1: You should try the ms-appx-web scheme. I believe that if you place the content in a subfolder, ms-appdata should work too. More on this on MSDN 回答2: I recently updated my Visual Studio 2015 apache cordova project to visual studio 2017. I had few

Windows 8 metro javascript app binding to a table

徘徊边缘 提交于 2019-12-12 12:21:32
问题 I am having trouble binding a table in my javascript metro app instead of binding with the html provided in the template it puts in a load of divs and renders the json as a string. This is what I have: <tr id="tableRow" data-win-control="WinJS.Binding.Template"> <td data-win-bind="innerText: label"></td> <td data-win-bind="innerText: value"></td> <td></td> </tr> <table> <thead> <tr> <th>col1</th> <th>col2</th> <th>col3</th> </tr> </thead> <tbody class="topContent" data-win-control="WinJS.UI

Is there a correct/recommended way of detecting my UWP app I'm running on a Phone?

被刻印的时光 ゝ 提交于 2019-12-12 08:37:27
问题 Trying out Windows Universal apps with JavaScript I noticed the WinJS.Utilities.isPhone property is no longer available, which makes sense since there would be no reason to ask for that at runtime. I do want to know just for testing purposes if there is a proper way of detecting the device my app is running in. EDIT: My question is NOT about detecting a mobile browser. I'm talking about about a brand new Universal Windows App for Window 10 that can run on phones, desktops, tablets, Xbox,

resize image before upload via background transfer in winjs

故事扮演 提交于 2019-12-12 04:56:12
问题 I would like to resize an image picked from the gallery of the phone before uploading it via background transfer so far I have:- filePicker.pickSingleFileAsync().then(function (file) { uploadSingleFileAsync(uri, file); }).done(null, displayException); function uploadSingleFileAsync(uri, file) { if (!file) { displayError("Error: No file selected."); return; } return file.getBasicPropertiesAsync().then(function (properties) { if (properties.size > maxUploadFileSize) { displayError("Selected