Menu
  • HOME
  • TAGS

Windows Metro App Terminated by OS

windows,windows-runtime,microsoft-metro,winjs,terminate

Those apps have background tasks that are run with a very low resource quota. Your app can have background tasks too, but you need to run within the constraints applied to those tasks. background tasks have no UI and can't depend on the UI parts of your app. See BackgroundTaskBuilder...

Reloading windows store app by calling its copy from Local storage

javascript,windows-runtime,windows-store-apps,windows-phone-8.1,winjs

Windows Store apps can't use absolute file paths. The correct way to refer to local storage is with ms-appdata:///local/. The ms-appx:/// does the same for in-package contents. However, Windows doesn't allow the app to load/refresh itself from local storage like this, so even using the right URIs you'll get an...

Hub/Pivot App template breaks when navigated

javascript,html5,windows-store-apps,windows-phone-8.1,winjs

Problem was solved by changing class in CSS-file of page created as PageControl. Here's code we need to edit: .fragment { -ms-grid-columns: 1fr; -ms-grid-rows: 128px 1fr; display: -ms-grid; height: 100%; width: 100%; } Just change class in html- and css-file, for example, to fragment2, and nothing breaks when you navigation...

Constantly logging to a file with Cordova-WebApp on Win 8.1/WinJS

cordova,logging,web-applications,winjs

I suggest separating all the code up to FileIO.appendTextAsync so that you cache a StorageFile object. A StorageFile is really just an abstraction for a pathname to allow for files that aren't actually backed by the file system. Keeping a StorageFile in hand, then, does not mean that you're holding...

mediaCapture windows 8.1 winjs app

java,html,video,windows-8.1,winjs

I solved the issue by setting msZoom propert to true. eg:videoplayer.msZoom = true; documentation...

How can I use the user's background color?

javascript,css,winjs

This actually isn't supported, by design. The principle is that because there isn't all the usual chrome like title bars that typically differentiates between system functions and app functions, the color theme is used instead. That is, the system color scheme exclusively identifies UI that's coming from the system itself,...

Listening to click events doesn't work in winjs

winjs

Found this code on another question: document.querySelector('body').addEventListener('click', function(event) { if(event.target.id == "main_description"){ } }); ...

WinJS - How to access whole folder tree without FolderPicker

windows-store-apps,windows-8.1,winjs

No, by design Windows Store Apps run inside an app container that limits what they're allowed to do without user consent. The only areas of storage that are openly accessible without further consent are the app's package location (which is read-only, see [Windows.ApplicationModel.Package.Current.installedLocation][1]) and its app data folders (see Windows.Storage.ApplicationData)....

Call Native C# from WinJS that's loaded in a WebView

windows-8,windows-runtime,winjs

You're correct in that the app host context for a native JavaScript app and the context for a webview are two different things. Only the app host allows JavaScript to talk to WinRT which applies also to WinRT components, as components are structured in the same way that the WinRT...

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

webview,windows-store-apps,winjs

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...

Copying App Package Folder To Isolated Storage For Windows Store App

javascript,windows-phone-8,windows-store-apps,winjs,windows-rt

I mixed filelist and folderlist together causing the app to crash. Creating functions for each process was the solution. var sourceFolder = Windows.ApplicationModel.Package.current.installedLocation; var destinationFolder = Windows.Storage.ApplicationData.current.localFolder; copyDirectories(sourceFolder,destinationFolder); function copyFiles(source, destination) { source.getFilesAsync().done(function (fileList) { if (fileList.size >= 1) { fileList.forEach(function (subFile) { subFile.copyAsync(destination, subFile.name,...

Do I need to minify my js file if i am doing winjs development?

winjs

Minification is just one strategy you can employ, depending on your needs. I wrote about this and other options on my blog: http://www.kraigbrockschmidt.com/2013/04/04/protecting-your-code/.

How can I bind click event in repeater element in winjs?

javascript,windows,windows-phone-8,winjs

This is straightforward to do using the function.bind method, and you can even have the handler directly in your Cell class. var Cell = WinJS.Class.define(function(number) { var e = document.createElement("div"); //...and initialize however. this.element = e; e.winControl = this; this.number = number; this.symbol = ""; //Also consider using pointerDown event...

Project Siena: import Excel Data

windows-store-apps,winjs,project-siena

Siena has its own importer, which utilizes the fact that xlsx files (Siena doesn't import .xls binary formats) are .zips file with a different extension. It's just unzipping the file and then parsing the XML contained therein. That said, importing Excel data happens in the Project Siena app, not in...

Detect when your windows 8 app is uninstalled?

c#,javascript,windows-runtime,winjs,uninstall

Not supported. A key goal with the Windows Store is to make it seamless and painless for consumers to try apps. One result of this is that Store apps don't have any control over or hooks into install/uninstall processes. Bottom line is that the act of uninstall is not a...

Can a HTML/WinJS View use a user control built in XAML/C#?

xaml,winrt-xaml,winjs,win-universal-app,winrt-component

No. The HTML and Xaml UI stacks in the Windows Runtime are separate and cannot be mixed. You can call non-UI C# or native Windows Runtime Components from JavaScript. You can include HTML in a Xaml WebView, but there is no reverse hosting. --Rob...

Enable the status bar in the Windows Phone javascript templates for Visual Studio 2013

javascript,windows-phone,winjs,windows-phone-8.1

You'll have to add some JavaScript to the ready function of a page for example. First get the statusbar for the current view. Than decide what to do with it: var s = Windows.UI.ViewManagement.StatusBar.getForCurrentView(); s.showAsync(); // shows the statusbar More about the statusbar can be found at the MSDN....

How to get number of items per row in Listview in winjs

listview,winjs,windows-applications

Finally, I managed to get number of items based on win-itemscontainer width. In my case, each item is of 158 px width + 5 px margin. So, item occupies 163px. Now to get number of items, var numberOfElementsPerRow = Math.floor(document.querySelector('.win-itemscontainer').offsetWidth / 163); ...

WinJS : Pivot and PivotItem slide event

winjs,windows-phone-8.1

You can't achieve this in pivot control straight away, but you can get the pivot slide direction in selectionchange event like this, document.getElementById("PivotID").addEventListener("selectionchanged", swipehandler); function swipehandler(evt) { var direction = evt.detail.direction; // 'forward' or 'backwards' } So in this selection change event you can check the length and index of...

Setting header in Web.HttpClient to contain quotations

javascript,post,winjs

If you set the authorization this way: var WebHttp = Windows.Web.Http; // just to fit in StackOverflow :) var authHdr = new WebHttp.Headers.HttpCredentialsHeaderValue("OAuth", authHeader); request.headers.authorization = authHdr; The quotes are not stripped from the value. Depending on what you're trying to do, you may want to take a look at...

Anyways of running app without requiring Windows 8 Pro version

windows-phone-8,visual-studio-2013,windows-8.1,winjs,win-universal-app

Windows Phone Emulator requires Hyper-V which needs Windows Pro version. That's probably why you aren't able to start your Emulator. As I've posted in comment, I've heard about VirtualBox and an ability to run WP Emulator on it. Some helpful links: other question on SO, VirtualBox forum, video. I'm not...

Refresh App contents Dynamically for Windows Store App

javascript,windows-phone-8,windows-runtime,windows-store-apps,winjs

Package contents are read-only, so you cannot replace them at runtime. A general strategy is to copy the package file to your local storage, and reference the image from there using ms-appdata:///local/ URIs (remember to create an instance of Windows.Foundation.Uri when necessary--check the API you're using). Then you can replace...

The target “GetSolutionConfigurationContents” does not exist in the project

msbuild,visual-studio-2013,winjs

The problem was in the package.appxmanifest file. Under the Packaging tab, I had set the "Generate app bundle" option to "Always". Setting it to "If needed" fixed the issue and the builds are now successful. UPDATE: The problem reoccurred when we targeted x64 builds only, so we had to keep...

Windows 8 store app capture video/photo without the special UI

javascript,windows-store-apps,windows-8.1,winjs

Yes there is, take a look at the MediaCapture class. In fact, that's the only way of doing it in Windows Phone (8.1). With that you can have a video element in one of your pages and stream directly what's being seen by the camera. I recently pushed the first...

WinJS app with C# background task for push notifications

javascript,c#,push-notification,windows-8.1,winjs

Typically you'd do this by having the C# background task project as part of the same VS solution, and then add a reference from the JS app project to the background task project. I would recommend not ever instantiating the C# component/class from your JS app, as this is not...

WinJS Stop javascript in memory

javascript,html,winjs

In your WinJS Page definition you can define unload method that is always invoked when the user leaves the page. Unregister all event handlers there. WinJS.UI.Pages.define("/page.html", { ready: function (element, options) { // add onclick handler }, unload: function() { // remove here all event handlers } }); ...

How to acces a file in App package for Windows store app

javascript,windows-phone-8,windows-runtime,windows-store-apps,winjs

Need to create an URI from the string first. var uri = new Windows.Foundation.Uri("ms-appx:///datafile.xml") Windows.Storage.StorageFile.getFileFromApplicationUriAsync(uri).done() MSDN Link: StorageFile.GetFileFromApplicationUriAsync...

WinJS programmatically take screenshot of app

cordova,windows-8.1,winjs

There isn't a good way to do this. Windows Store apps don't have any explicit screenshot API (Windows Phone Store apps do have a phone-only ScreenCapture API) and HTML and JavaScript don't provide a way to render arbitrary HTML to a bitmap (such as Xaml's RenderTargetBitmap). You render the contents...

WinJs getFileAsync without stating a folder first

javascript,windows,winjs

Kind of simple once you see the API. Use Windows.Storage.StorageFile.getFileFromPathAsync('YOUR_FILE_PATH') .then(function (file) { }); ...

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

javascript,html5,windows-8.1,winjs,windows-phone-8.1

This is mostly likely caused by the iframe security model. At Features and restrictions by context the table lists Cross-domain XHR requests as being disabled in the web context (which, according to Developing secure apps "remote web content loaded by an iframe is always loaded in the web context"). If...

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

javascript,winjs,windows-universal

Caveat: Any form of device detection is fragile due to the dynamic nature of hardware - a new device could come along tomorrow that breaks your app's logic. It is best to use these APIs only for telemetry / analytics rather than to trigger runtime behaviour. More often than not,...

Localization in Cordova+WinJS application

visual-studio,cordova,localization,winjs,msdn

I think you are missing the processing for those locale file resources. It should be on the pages/home/home.js on ready handler. Like this ready: function (element, options) { WinJS.Resources.processAll(); . . . } This makes use of the localizations and replaces those to places where they are used....

WinJS Repeater Only Binding First Property

windows,repeater,winjs

A Repeater template may have only one direct descendant element (like in the case below, a single child div: <div class="dataColumns" data-win-control="WinJS.UI.Repeater" > <div> <h2 data-win-bind="textContent: Title"></h2> <h3 data-win-bind="textContent: SomeOtherProperty"></h3> </div> </div> Results: You may also consider using a WinJS.Binding.Template for the contents of the Repeater: <div class="template" data-win-control="WinJS.Binding.Template"> <div>...

WinJS: Is it posible to add a budge to a Pivot Item programatically?

javascript,html,css,windows-phone-8.1,winjs

Found a workarround: var pivotHeader = document.querySelector(".win-pivot-headers"); if(pivotHeader != null) { var headers = pivotHeader.childNodes; for (var i = 0; i < headers.length; i++) { var badge = document.createElement('span'); badge.id = "unseenConversationsBudge"; badge.innerHTML = "10"; headers[i].appendChild(badge); WinJS.UI.Animation.fadeIn(badge); } } And then handle it in the inicialization event of the app...

Navigating to another html in Windows store app

javascript,windows-phone-8,windows-runtime,windows-store-apps,winjs

Although you can get document.location and navigation to work (and note that it's document.location, not window.location), the recommended approach is to implement the app like a single-page web application, meaning that you "navigate" by dong DOM replacement inside default.html/index.html. That is, you're page context is always the default HTML page,...

WinJS css file from local storage

windows-8,windows-store-apps,winjs

I think I found a way to get the CSS to load. I tested the code below by adding a css file that sets the body background to red in the local storage folder. The code reads the contents of the file, creates a style tag in the head and...

WinJS.Resources.getString with non-WinRT apps

cordova,localization,windows-runtime,winjs

Yes you can do that but not directly. Before calling WinJS.UI.processAll you have to read resjson and set the global "strings" variable: var loadLocalRessources = function (language) { language = language || 'en'; return new WinJS.Promise(function (complete, error) { var url = './strings/' + language + '/resources.resjson'; console.log('trying to load...

WinJS Promise based file upload queue

javascript,queue,promise,winjs,blockingqueue

Your problem is that pendingFiles is always empty. In createTaskForFile, you would set it to an one-element array then, but immediately call uploadNextAsync() which shifts it out. I guess your script might work if you shifted the file after the file has been uploaded. However, you actually don't need this...

winJS return var from function undefined

javascript,jquery,windows,function,winjs

When working with asynchronous API calls like StorageFolder.getItemAsync, it doesn't work to assign the ultimate result to a local variable and attempt to return that. In your code, moreover, you have two return statements, the first of which returns a promise inside which is wrapped the return value from a...

WinJS - ListView event bubbling

html5,knockout.js,winjs

I got the answer with the help of this post change in my template, <input type="number" class="win-interactive" data-win-bind="value: SelectedQuantity; onclick: clickInTextFunction;" /> change in my modal class, public clickInTextFunction: any; constructor(odataObject?: any) { this.clickInTextFunction = WinJS.Utilities.markSupportedForProcessing((ev) => { ev.stopImmediatePropagation(); }); } ...

WinJS 3.0 Apps on LG and Samsung Smart TVs

winjs

WinJS itself doesn't have any functionality particular to hardware devices. It's a general library that contains UI controls and things like promises and data binding, so anything you'd do specific to SmartTVs would have to come from those manufacturer's SDKs. I would imagine those SDKs would have the ability to...

CSS animation in Windows 8.1 application not working

css3,animation,windows-8,windows-8.1,winjs

It turned out nothing was wrong with the animation declaration itself, as expected. We had just wrapped the keyframes definition inside of a media query. Apparently, even though the media query was valid and was being correctly applied, neither IE11 nor Windows 8.1 would render the animation. Long story short,...

WinJS Creating multiple folders

windows-8,windows-store-apps,winjs

The second parameter of the first createFolderAsync call should be Windows.Storage.CreationCollisionOption.openIfExists instead of NameCollisionOption. var promises = []; _.each(files, function (file) { promises.push(localFolder .createFolderAsync(folder1Name, Windows.Storage.CreationCollisionOption.openIfExists) .then(function (folder1) { return folder1.createFolderAsync(folder2Name, Windows.Storage.CreationCollisionOption.openIfExists); }) .then(function (folder2) { return folder2.createFileAsync(fileName,...

WinApp 8.1 (WinJS) App with AngularJS

angularjs,winjs,winapp

I see you're including winstore-jscompat.js... Please see this issue: https://github.com/MSOpenTech/winstore-jscompat/issues/8 ..which is fixed in this fork: https://github.com/ClemMakesApps/winstore-jscompat/blob/master/winstore-jscompat.js Note that this will probably be pulled into the main project at some point so this issue should go away "soon"....

Sequentially execute a bunch of WinJS promises from an array

javascript,asynchronous,coffeescript,promise,winjs

Let's abstract out the function to break the array into tuples function chunkBy(array, n) { var chunks = []; for (var i=0; i<array.length; i+=n) chunks.push(array.slice(i, n)); return chunks; } and the function that does the work for each item: function tryToLoad(url) { return WinJS.Utilities.Scheduler.schedulePromiseBelowNormal() // not sure .then(function() { return...

winJS(CameraCaptureUI) How to preview(done) and SAVE(?) picture to disk?

camera,windows-runtime,windows-8.1,winjs

Here is the answer: function testSavePictureDisk() { // S1: Create a new Camera Capture UI Object var cam = Windows.Media.Capture.CameraCaptureUI(); //location? var name = document.getElementById('ticketnum').innerHTML + '.jpg'; var folder = Windows.Storage.KnownFolders.picturesLibrary; //was windows.storage // S2: Perform an Async operation where the Capture // Image will be stored as file folder.createFileAsync(name,...

Change WinJS data-win-bind using JavaScript

javascript,winjs

If you modify the HTML as Joel suggests, you need to call WinJS.Binding.processAll on the containing element with its data source to update the actual bindings. That is, the declarative format with data-win-bind are just instructions to processAll for how it uses WinJS.Binding.bind or the data source's bind method (which...

WinJS.xhr blob image doesn't show in php server?

php,windows-runtime,winjs,restful-architecture

Working. Here's the answer: public function uploadpicture(){ if($_FILES['data']['error'] == 0){ // success - move uploaded file and process stuff here echo 'success'; echo var_dump($_FILES) ; move_uploaded_file($_FILES["data"]["tmp_name"],"....server location".$_FILES["data"]["name"] ); }else{ // 'there was an error uploading file' stuff here.... echo 'error uploading file'; } } ...

Error when instantiating WinJS.UI.ListView with template from code

javascript,windows-8,windows-8.1,winjs

The only workaround I've been able to get to work is to instantiate the template in code, then pass a function to the itemTemplate option when instantiating the ListView. The documentation on what is expected here is sparse, but all of the demos where the ListView is instantiated via code...

How to deploy a WinJS 3 app to Azure as a website?

azure,winjs,azure-web-sites

If your app is like the sample WinJS app you've linked to, you do not need to wrap it any additional web frameworks. Simply deploy your static /www HTML/CSS/JS files to the root site\webroot web directory. If you deploy the entire Cordova app, including the 'www' folder, you should be...

Call pointerUp Animation When Mouse Moves Away From Button

javascript,windows-store-apps,winjs

You want the pointerOut event, see http://msdn.microsoft.com/library/windows/apps/hh465904.aspx. If you want the full story on pointer events, see my free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition, in Chapter 12.

HTTP API call refuses to accept a data field

javascript,winjs

Don't put question mark in formparams var formparams = "username={email}&password={password}";

onloadingstatechanged does not fire when navigating back from another page

javascript,windows-8,windows-8.1,winjs

I found the problem. Referring to the listview by class .itemslist it does not work. Something works differently in the listview when you are coming back from another page as opposed as to when you navigete to the page directly. So I just assigned an ID to the ListView div...

How to manually trigger oniteminvoked in a WinJS ListView

javascript,listview,windows-store-apps,winjs

Overall, the ListView just handles clicks by passing them to whatever itemInvoked handler you register for the control. This means you should be able to just bypass that whole chain and invoke your handler directly with the appropriate item index, which is easy to obtain. Within your item's click handler,...

Win-ListView and AngularJS

angularjs,winjs

Okay, shame on me. I was confused by the error message it throwed, but it was just a stupid implementation failure. Removig the <p></p> Tag resolved the problem and the list works like expected. I just needed three hours to figure that out... :/...

Where can I download a pre-compiled version of WinJS? [closed]

winjs

UPDATE: Microsoft has made a lot of progress and has now gotten on board with how libraries are normally deployed. You can get it from NPM, Bower, CDN, or create a custom build. Details at http://try.buildwinjs.com/#get Original answer: If you install Visual Studio 2013 (you'll need a x86 or x64...

Windows store apps JS : uplaoding a video file with WinJS.xhr

javascript,windows-store-apps,winjs

Okay, I found a way to do that. First ou need to get the file with getFileAsync() and not the Picker. Then you can create a blob with the stream of your file and add this blob to your form. Here my code var videosLibrary = Windows.Storage.KnownFolders.videosLibrary; videosLibrary.getFileAsync(file.name).then( function completeFile(file)...

How to target WP8.0 using VS2013, using Navigator from WinJS and BarcodeScanner from Cordova

winjs,cordova-plugins

If you look in the Navigation template project, you'll see navigator.js in the js folder. This is the implementation of the PageControlNavigator class, so you just need to pull that one file into your Cordova project. This is separate from WinJS. For WinJS itself, the best thing to do it...

Windows Phone 8.1 WinJS Appbar disabled property not working

javascript,html,windows-phone-8.1,winjs

Do you init appBar variable properly? It's not defined in your code snippet. Try this way, at least it works in my app. <script> (function(){ var appBar = document.getElementById("appBar"); if(appBar.winControl) { appBar.winControl.disabled = true; } }()); </script> Also don't forget that WinJS.UI.processAll runs asynchronously, so your script can't just be...

Exit application in Windows Phone 8.1 multi device hybrid app

cordova,windows-phone-8.1,winjs,multi-device-hybrid-apps

Hell, It was just one line. You can close your windows 8.1 apps using window.close(); Edit Some of Microsoft engineers point out the mistake here: window.close() is not a safe way to implement the app, calling this method will break app suspend and resume also might lose data when user...

Azure Mobile Services authentication with WinJS

winjs,azure-mobile-services

The tutorial for using WinJS is here: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-store-javascript-get-started-users/ On your client object, call: client.login('microsoftaccount').done(function (result) { // handle successful login }, function (error) { // handle failed login }); More details can also be found in the reference guide: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-html-how-to-use-client-library/#caching...

Use file protocol in WinJS app

windows-runtime,winjs,file-uri

Use of the file protocol is not allowed by design, see How to Reference Content, https://msdn.microsoft.com/en-us/library/windows/apps/hh781215.aspx. To reference arbitrary content on a user's hard drive requires user consent, and thus selection of arbitrary files and folder must necessarily go through the File Picker API, or if the user navigates to...

Iterate over array of WinJS Promises and break if one completed successful

asynchronous,promise,winjs

Basically you want return promise1.catch(function(err) { return promise2.catch(function(err) { return promise3; }); }) or (flattened) makePromise1().catch(makePromise2).catch(makePromise3); You can easily create this chain dynamically from an array of to-be-tried functions by using reduce: return promiseMakers.reduce(function(p, makeNext) { return p.then(null, makeNext); }, WinJS.Promise.wrapError()); or if you really have an array of promises...

How can I create a StorageFile object from URI?

javascript,html5,windows-runtime,windows-store-apps,winjs

I am afraid your only option is to download the file to local storage, and then go from there.

Mobilefirst 7 -> windows 8 URL activation scheme parameters

cordova,windows-8,winjs,mobilefirst

Where are you calling the addEventListener ? Perhaps, the onactivated event has already been raised before you called the addEventListener. I was able to intercept the loading in the cordova.js file and added an event listener and the appropriate function was fired. ...

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

c#,windows-runtime,windows-8.1,winjs

It's not actually possible to share UI elements between the HTML/CSS rendering engine (the JS app) and a C#/C++ component. The C# code won't have the underlying runtime that understands an HTML element object. Similarly, a UIElement from XAML won't make any sense to the HTML/CSS engine in the JS...

How to initialize the camera correctly in Windows 8?

javascript,windows,camera,winjs

I found the problem. The above function was in this code block: WinJS.UI.Pages.define("/pages/queue/view.html", { ready: function (element, options) { } } The problem is: The ready callback is for the DOM elements and not for javascript, so it was still processing aSync code, and WinJS can't handle multiple aSync processes...

WinJS: Save observable objects without backingData etc. to JSON

json,save,winjs,observable

use WinJS.Binding.unwrap over the individual elements in the array.

Single page navigation not working properly

javascript,winjs

You have to wait, until all resources are loaded. WinJS.UI.processAll().done(function () { document.getElementById("page3").onclick = function () { WinJS.Navigation.navigate("/pages/page3/page3.html"); }; }); More info: https://msdn.microsoft.com/es-es/library/windows/apps/hh440975.aspx...

Windows Phone 8.1 WinJS Keyboard Page Resize

winjs,windows-phone-8.1

You should be able to prevent this with the EnsuredFocusedElementInView property. You can register an event listener to fire when virtual keyboard starts showing, and set event.ensuredFocusedElementInView = true to prevent the app from resizing the visual viewport, which is what causes the longer, scrollable, page. // React to Soft...

Is it possible to create Windows cordova plugin with C#

cordova,winjs,cordova-plugins

JavaScript is a native language on Windows and Windows Phone. On these platforms, all JS code in a Cordova app--plugin and app code alike--can call Windows APIs because the code is running in the native app host and not inside a Webview. (I talk about this in an MSDN article...

WinJS - WinRT Component - The application called an interface that was marshalled for a different thread

c#,windows-8,windows-runtime,winjs

I believe what you're missing is a call to Task.Run, which is what actually creates the Task that will run the operation on a separate thread and do the marshaling. That is, your SaveSpreadsheet function says it's returning Task but doesn't actually create the Task anywhere, and is thus just...

Stopping AppBar control showing on right click in WinJS

windows-store-apps,winjs,appbar

I answer this in my free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript (2nd edition), in the app bar section (page 480): Tip To prevent the app/nav bar from appearing, you can do one of two things. First, to prevent an app bar or nav bar from...

Can cross-sliding be used in WPF?

c#,wpf,winjs

It's not built in. You'd need to build it, buy it (there may be a third party toolkit that offers similar behavior), or create a Windows Store application.

Call method on object via invokeScriptAsync

javascript,winjs

The only way I have been able to make calling methods on an object work is by passing eval to the invokeScriptAsync method: webview.invokeScriptAsync("eval", "object.subobject1.subobject2.method('arg1', 'arg2', 'arg3');").start(); ...

Windows Phone 8.1 Universal app adding a new contact

javascript,html5,windows-phone-8.1,winjs,win-universal-app

If you want to show the contact information to the user and then have them save it, see this walkthrough using the ContactManager.ShowContactCard method.

Reloading a page in WinJS fails to attach event handlers

windows-8,windows-runtime,windows-store-apps,windows-8.1,winjs

Page nav in WinJS is just a matter of DOM replacement. When you do a nav, the target “page” contents are loaded into the DOM and then the previous “page’s” contents are unloaded. You can see this in navigator.js in the _navigating method. It creates a new element for the...

Change the title of the select control

winjs,windows-phone-8.1

I don't think this title can be edited. The selection screen is something that comes from the OS.

Check for Valid Image using getFilesAsync()

png,jpeg,winjs,gif,getfiles

Instead of trying to process pathnames, it will work much better to use a file query, which lets the file system do the search/filtering for you. A query also allows you to listen for the query's contentschanged event if you want to dynamically track the folder contents rather than explicitly...

Are there any sample projects out there showing how to use SignalR with a WinJS Windows 8.1 projects?

signalr,winjs

So I figured out my problem. Apparently you have to register your client-side javascript methods with the hub client before you call $.connection.hub.start(). This post: SignalR JS Client Methods Not Invoked provided the answer. ...

windows phone 8.1 javascript tap and hold feature

winjs,windows-phone-8.1

I believe you need to take a look at the MSGestureHold event. You just need to add an event handler for that event. Take a look at the MSGestureEvent object for more events you might need...

How to include *.min.* in Release and *.* in Debug Builds and preserve parent folder?

msbuild,winjs

%(RecursiveDir) items metadata are available just in case you use wildchar **. See documenation of MSBuild Well-known Item Metadata I’m don't use WinJS but in case Link metadata are used in places where you need reference the files js and css files this could be solution for you: <Content Include="WinJS\**\*.css;WinJS\**\*.js"...