TypedMVVM samples for Windows 10 UWP and IoC fixes

A new version of the TypedMVVM samples is now available on CodePlex and contains a basic sample targeting Windows 10 UWP.

The repository also contains a fix for the basic IoC container: now the code correctly handles the register<T>() and resolve<T>() functions and populates the internal dictionary of object instances

My friend Lee has also pushed to GitHub a new sample using TypedMVVM for web apps here: check it out!

Windows 10 – Fixing Windows Store crash

I’ve just updated my machines to the latest Windows 10 build 10240 (download available from here) and noticed that the Store app was no more starting up since crashing when launched in a specific PC.

After some investigations I cleared the content of the following local folder and all started to work correctly:

Hope this helps!

NDepend v6 available

Version 6 of NDepend is now available for download from the official site.

New features include:

  • enhanced Visual Studio integration;
  • support for Visual Studio 2015;
  • rule files shareable amongst projects;
  • default rules description and HowToFix;
  • default rules less false positives;
  • colored code metric view;
  • intuitive display of code coverage percentage;
  • compiler generated code removal;
  • async support;
  • analysis enhancements;
  • support for Visual Studio Blue, Dark, Light themes;
  • support for high DPI resolution;
  • integration with TFS, SonarQube and TeamCity.

A detailed description of the new capabilities is available here.

Windows 10 UWP: Using PlayReady content protection with live DASH

I’ve recently blogged about using PlayReady content protection with Smooth Streaming on Windows 10 UWP by initialising a MediaProtectionManager object in the player element.

Since PlayReady is a technology for handling protected media content, it is possible to use it with different stream formats like Dynamic Adaptive Streaming over HTTP (DASH).

In the previous days, I have been exploring the live DASH sample available in the Universal Windows Platform repository on GitHub: the example enables playback of streams containing the profile “urn:mpeg:dash:profile:isoff-live:2011“.

It is possible to just add PlayReady content protection to this live player by initialising the MediaExtensionManager and then handling the MediaProtectionManager setup / ServiceRequested event:

The updated Visual Studio solution is available here on GitHub.

Smooth Streaming PlayReady samples for Windows 10 UWP available on GitHub

Lately I have been investigating PlayReady support available in the new Windows 10 Universal Windows Platform and found that the additional SDK necessary for Windows 8.1 Universal apps is not required for UWP since PlayReady Client is now part of the platform as described in this MSDN documentation.

When migrating Windows 8.1 apps to UWP, the key is to change the namespace from Microsoft.Media.PlayReadyClient to Windows.Media.Protection.PlayReady:

I have just pushed two samples on GitHub (C# and JavaScript) which also require the Universal Smooth Streaming SDK.

Multi-Touch Behaviors project moved to GitHub

I’ve just pushed to GitHub a first version of the Multi-Touch Behaviors containing a new sample targeting Windows 10 UWP (work in progress…) and some refactoring using shared projects in order to simplify the code and reusing it across different platforms.

For new contributions just send pull requests here!

Multi-Touch Behaviors sample: Main Page

Windows 10 UWP and Project Westminster: giving new life to your web sites with Hosted Web Apps

One of the most interesting features available in the new Windows 10 Universal Windows Platform (UWP) is the concept of Hosted Web Apps: an existing web site can be easily published to the Windows Store by creating a package pointing to it and, in this case, enabling access to the underlying UWP platform.

This feature enables the developer to easily enrich existing sites with Windows 10 specific functionalities and services like Cortana, Voice recognition, Xbox Live, just to name a few.

The steps required for creating an hosted web app using Visual Studio 2015 are quite simple:

1 – Create a new JavaScript Windows Universal project:


2 – Remove all unneeded source files from the project

Since the app will be pointing to an existing web site, the folders js / css / WinJS and the default.html file can all be removed from the project


3 – Modify the app manifest to provide the target URL and content rules

The package.appxmanifest file must contain the details of the Start Page and also the content rules specifying if the web site will have access or not to the Windows Runtime:


4 – Access desired Windows Runtime functionalities in the website code

I’ve created a very simple web page which will be accessing the UWP platform if the code is executed within an hosted web app. In this case we are only verifying the internet connection, but it could be modified to access Cortana APIs!


Here we go. These are the steps required for creating an hosted web app in Windows 10 UWP.

If you want to play with the code, I’ve published the sample on GitHub.

Player Framework Beta 3.0 and Universal Smooth Streaming Client SDK for Windows 10 UWP available

A new version of the Player Framework targeting Windows 10 UWP is now available for download from Codeplex. Smooth Streaming support is provided via the Universal Smooth Streaming Client SDK available in the Visual Studio gallery.

PlayReady is now part of the UWP platform (read the original discussion here), so there is no additional SDK required.

Player Framework 3.0 can also be used on Windows 8.1 Store apps and supports both XAML and WinJS 4.

TypedMVVM and WinJS: Binding event handlers in a ListView ItemTemplate

I have recently received a request in the TypedMVVM forums about binding event handlers to a specific WinJS ListView item template.

I’ve then decided to improve the current samples available in the repository by adding some basic commands, using the RelayCommand<T> class, that can be fired by pressing a button associated to each item of the ListView:

The key here is to add the “win-interactive” class to the specific button element contained in the template (otherwise the click event will not be triggered) and then use WinJS.Utilities.markSupportedForProcessing() in the model to allow the declarative binding to be correctly applied:

Specific instances of the ListView model can be created by the sample service responsible for initialising the ViewModel data:

As usual, the sample code is available for download here.

Cordova Windows Store apps and certificate expired error

I was updating TypedMVVM to the latest Visual Studio 2013 Update 4 and Cordova tools (using the new free Community Edition) and trying to deploy the sample to the Windows 8 emulator when I received the following

error APPX0108: The certificate specified has expired

As pointed here by Microsoft Open Technologies, the certificate available in the Visual Studio template has just expired and is not possible to deploy Windows Store apps using the old one.

To solve this problem I’ve then downloaded from here the updated certificate and copied to the following location inside the Visual Studio project:


The updated code is available for download on CodePlex.