win8 - Dave's Blog

Search
My timeline on Mastodon

Multiple Windows in Win10 JavaScript UWP apps

2018 Mar 10, 1:47

Win10 Changes

In Win8.1 JavaScript UWP apps we supported multiple windows using MSApp DOM APIs. In Win10 we use window.open and window and a new MSApp API getViewId and the previous MSApp APIs are gone:

Win10 Win8.1
Create new window window.open MSApp.createNewView
New window object window MSAppView
viewId MSApp.getViewId(window) MSAppView.viewId

WinRT viewId

We use window.open and window for creating new windows, but then to interact with WinRT APIs we add the MSApp.getViewId API. It takes a window object as a parameter and returns a viewId number that can be used with the various Windows.UI.ViewManagement.ApplicationViewSwitcher APIs.

Delaying Visibility

Views in WinRT normally start hidden and the end developer uses something like TryShowAsStandaloneAsync to display the view once it is fully prepared. In the web world, window.open shows a window immediately and the end user can watch as content is loaded and rendered. To have your new windows act like views in WinRT and not display immediately we have added a window.open option. For example
let newWindow = window.open("https://example.com", null, "msHideView=yes");

Primary Window Differences

The primary window that is initially opened by the OS acts differently than the secondary windows that it opens:

Primary Secondary
window.open Allowed Disallowed
window.close Close app Close window
Navigation restrictions ACUR only No restrictions

The restriction on secondary windows such that they cannot open secondary windows could change in the future depending on feedback.

Same Origin Communication Restrictions

Lastly, there is a very difficult technical issue preventing us from properly supporting synchronous, same-origin, cross-window, script calls. That is, when you open a window that's same origin, script in one window is allowed to directly call functions in the other window and some of these calls will fail. postMessage calls work just fine and is the recommended way to do things if that's possible for you. Otherwise we continue to work on improving this.

PermalinkComments

URI functions in Windows Store Applications

2013 Jul 25, 1:00PermalinkCommentsc# c++ javascript technical uri windows windows-runtime windows-store

Microsoft Surface: a gentle kick in the teeth of the OEMs | Ars Technica

2012 Jun 25, 12:59

But if Surface is aimed at the OEMs—telling them “we can do this just as well as you can, if we have to”—and setting them a challenge—”your tablets have to be at least this good”—then the limited availability isn’t necessarily such a big deal. As long as the OEMs heed the warning and raise their game, so that Redmond can be assured that bad hardware won’t jeopardized Windows 8’s success, Microsoft could safely keep Surface operating as a small-scale operation, playing the Nexus role without upsetting the PC market.

PermalinkCommentstechnical surface win8 windows windows8 business

The Verge has the best earliest coverage of the Microsoft...

2012 Jun 18, 1:07


The Verge has the best earliest coverage of the Microsoft Surface press conference and pretty photos.

Microsoft Surface event 2012: everything you need to know

PermalinkCommentstechnical windows win8 tablet surface laptop windows-8

Application Protocols in Windows 8

2012 Jun 12, 4:09
In Windows 8 you can still register a desktop application to handle a particular URI scheme, but now you can also register a Metro Win8 application to handle a particular URI scheme. No more manually modifying the registry - now there's pretty UI in VS to handle this.
PermalinkCommentsapplication-uri programming technical uri windows windows8

Try Chrome in Metro mode

2012 Jun 7, 3:34

Early Chrome for Win8 Metro!

PermalinkCommentschrome google web-browser web metro win8 windows technical

Changing Windows Live IDs

2012 Jun 6, 2:54

Use of my old Hotmail account has really snuck up on me as I end up caring more and more about all of the services with which it is associated. The last straw is Windows 8 login, but previous straws include Xbox, Zune, SkyDrive, and my Windows 7 Phone. I like the features and sync'ing associated with the Windows Live ID, but I don't like my old, spam filled, hotmail email address on the Live ID account.

A coworker told me about creating a Live ID from a custom domain, which sounded like just the ticket for me. Following the instructions above I was able to create a new deletethis.net Live ID but the next step of actually using this new Live ID was much more difficult. My first hope was there would be some way to link my new and old Live IDs so as to make them interchangeable. As it turns out there is a way to link Live IDs but all that does is make it easy to switch between accounts on Live Mail, SkyDrive and some other webpages.

Instead one must change over each service or start over depending on the service:

Xbox
In the Xbox 360 system menu you can change the Live ID associated with your gamertag. This worked fine for me and I got an email telling me about the transfer of my Microsoft Points.
Zune
There's no way to do this for the Zune specifically, however changing over your Xbox account also transfers over all your Zune purchased content. I don't have a Zune Pass so I can't confirm that, but all of my previously purchased television shows transferred over successfully.
Windows 7 Phone
To change the main Live ID associated with your phone, reset your phone to factory default and start over. All purchased applications are lost. Had I purchased any applications I would have been pissed, but instead I was just irritated that I had to reset my phone.
Mail
I don't use my Hotmail account for anything and it only sits and collects spam. Accordingly I didn't attempt switching this over.
SkyDrive
I didn't have much in my SkyDrive account. I downloaded all files as a zip and then manually uploaded them to the new account.
PermalinkCommentshotmail domain win8 skydrive technical windows live-id

Use Windows Live Hotmail with your own custom domain

2012 Jun 4, 2:49

In Win8 you login with a Windows Live account.  If you hook up a custom domain to a Live account you can login with that custom domain.

PermalinkCommentstechnical windows win8 hotmail live dns

The Metro Developer Show

2012 Apr 20, 9:15

The Metro Developer Show is the first podcast exclusively for Metro developers and enthusiasts.

Each week Ryan and Travis Lowdermilk traverse the exciting world of Metro (phone, tablet, desktop and Xbox); covering the latest news and exploring what it means for the developer community and everyday users.

PermalinkCommentsaudio technical podcast metro windows programming win8

Microsoft talks Windows 8 SKUs: Windows 8, Windows 8 Pro, and "Windows RT" for ARM

2012 Apr 16, 2:11

Windows RT is the name of the Win8 ARM SKU? That’s funny because its also the Windows Runtime: http://msdn.microsoft.com/en-us/library/windows/apps/br211377

PermalinkCommentstechnical win8

How to collect JavaScript performance data for Windows Metro apps on a device that does not have Visual Studio installed

2012 Mar 16, 2:27

Documentation for the VS JS profiler for Win8 HTML Metro Apps on profiling apps running on remote machines. 

PermalinkCommentswin8 programming technical js vs

Dave Weston on security best practices in Win8 HTML Metro Apps.

2012 Mar 14, 9:29PermalinkCommentssecurity technical video david-weston wwa win8 programming html javascript
Older Entries Creative Commons License Some rights reserved.