I’ve just achieved the MCSD App Builder certification

In the previous days, I’ve received confirmation that I achieved the new certification


Microsoft Certified Solutions Developer: App Builder  it validates that you have the skills needed to build modern mobile and/or web applications and services.

The exams required are fully explained on the certification website and, interestingly, the MCSA (Microsoft Certified Solutions Associate) path is now a mandatory step for earning the MCSD and can be chosen from Web Applications or Universal Windows Platform.

valuable post in the “Born to Learn” site describes the changes and the transition paths available from the existing MCSD to the new ones.

The new certifications will not have an expiry date, and there will be the possibility to re-earn them by passing every year an additional exam taken from the list of electives.


Using Prism modularization in Xamarin.Forms

Recently, Prism for Xamarin.Forms 6.2.0 has been released with many notable improvements including a new bootstrapping process, AutoWireViewModel behaviour changes, deep-linking support,  modularity and Prism template pack enhancements (full release notes available here).

Today, I fired up Visual Studio to have a play with this new version and decided to try the Xamarin.Forms support for Prism Modules: this is a very useful feature which allows to separate clearly the various parts of the application and improve quality, extensibility and readability of the code.

After downloading the new template pack, I created a new solution selecting New Project => Templates => Visual C# => Prism => Forms => Prism Unity App:


The new wizard is very useful and permits to select the platforms to target in the project: I selected Android, iOS and UWP and the project was generated targeting the three platforms with a shared PCL. NuGet packages were already updated to the latest version so no need for further actions.

While exploring the new project structure and the new modularization stuff, I decided to create a new Xamarin.Forms portable class library containing a module with a single View/ViewModel (SamplePage SamplePageViewModel) visualised when a user interacts with a button on the home page.

The new module required the definition of the following class implementing the Prism IModule interface:

To keep the logic separated from the rest of the app, I decided to register the navigation type for SamplePage inside the Initialize() method of the module which will be triggered when the module loads.

I also applied Xamarin.Forms XAML compilation to the module to improve performance, which is always great to have 😉

It’s worth noting that in this new Prism release the default value for the attached property ViewModelLocator.AutowireViewModel is set to true, so we can omit it and the framework will automatically associate SampleViewModel as the BindingContext for the view:

I then explored the new breaking changes for the bootstrapping process: the application class now needs to inherit from the PrismApplication class and two new virtual methods OnInitialized() and RegisterTypes() permit respectively to specify the implementation for navigating to the home page and registering the known types / ViewModel’s for navigation:

The third overridden method, ConfigureModuleCatalog(), informs the app to initialize the catalog with the module we created previously and set the initialization mode to OnDemand which means the module is not activated when the application starts, but it must load explicitly. This feature is particularly useful in cases in which some functionalities of the app must initialise after some other requirements like, for instance, successful authentication or applications extended via modules.

The sample view was in place, so I proceeded with the implementation of the HomePage: I wrapped the existing one in a NavigationPage to allow the correct back stack and then created two commands for initializing the module and navigating to the SamplePage defined previously:

and the corresponding ViewModel:

The module is initialized by injecting the Prism ModuleManager and then calling the LoadModule() method:

The navigation to the page defined in the module is performed by:

The property IsSampleModuleRegistered permitted to control the CanExecute() for the button commands using this nice fluent syntax using ObservesProperty(()=>….) available in Prism:

Here we go: I found the Prism implementation in this new version very stable and working well with Xamarin.Forms. The modularization capabilities are useful to write clean, maintainable and extensible apps.

The source code is available for download as part of the official Prism samples on GitHub.

Looking forward to exploring all the other capabilities available in Prism and Xamarin.Forms. Happy coding!

I’m now a Microsoft Certified Solutions Developer – Universal Windows Platform

I’ve just completed the exams required to earn the MCSD: Universal Windows Platform Solutions Developer certification

MCSD Universal Windows Platform

As described in the official certification website, with this certification you

Demonstrate your expertise at planning the designing and implementing Universal Windows Platform apps that offer a compelling user experience, leverage other services and devices, and use best coding practices to enhance maintainability.

I decided to start my MCSD journey last June while studying for the Xamarin Mobile Developer Certification: I discovered that preparing for the exams is an excellent way to learn new skills and “stretch your muscles” for ensuring you know a lot of details related to the technologies you work on and become a better developer.

The current requirements include the following exams:

As described in the “Born to Learn” website, the requirements will change on March 31, 2017, and exams 354 and 355 will be substituted by

Some links I found useful for preparation:


I’m a Xamarin Certified Mobile Developer!

In the previous weeks, I subscribed to Xamarin University and attended the 15 mandatory interactive on-line classes for achieving the Xamarin Certified Mobile Developer certification.

Today, I took the final exam consisting of 150 questions to be completed in 3 hours and covering topics related to Xamarin.Android, Xamarin.iOS, Cross-Mobile development and Xamarin.Forms.

I’m very proud to have passed the exam at the first tentative and achieved this new certification! 🙂

Xamarin Ceritified Mobile Developer Badge-high res

The certification process is really worth the investment: the on-line classes are well prepared, the instructors very friendly and the subjects contain useful information.

For anyone interested in acquiring this certification, I personally suggest following with attention the on-line classes and study well all the provided exercises and the official documentation!

Xamarin.Forms: sharing resources in XAML using Styles

Previously, I’ve blogged about creating a custom Behavior in Xamarin.Forms. The sample published on GitHub initially used the default template available in Visual Studio which instantiates the Application singleton from C# using the following App class:

This is a great approach, however very often it is useful to define common resources in XAML and reuse them across the application using Styles.

To achieve this, It’s possible to transform the App class in a partial one and add a new App.xaml source file containing a resource dictionary to be shared:

In this code, I’ve defined a new resource with a specific Padding to be applied only on iOS via the OnPlatform class, and an explicit style named PageStyle targeting ContentPage types.

The modified code behind is now taking care of parsing/loading the XAML (via the InitializeComponent() call) and then creates an instance of SamplePage:

The page can now consume the new style specifying Style=”{StaticResource PageStyle}” (dynamic resources are also supported):

This is a basic example of using styles in Xamarin.Forms: a complete coverage of the various options is available on the Xamarin official documentation.

The source code is available for download here.

Enabling PlayReady support on Xbox One UWP Developer Preview

In the previous days I was trying the recently released Xbox One UWP Developer preview with these samples involving Smooth Streaming / PlayReady and noticed that playback was not working properly on the console with the MediaElement always returning the error MEDIA_ERR_SRC_NOT_SUPPORTED – 0x80070005.

As highlighted in this forum post, the following capability must be added to the app manifest in order to enable playback of PlayReady DRM protected content on Xbox One UWP developer preview:

I’ve updated the Smooth Streaming / PlayReady samples and they are now available for download here on GitHub.

Xamarin.Forms: using the PanGestureRecognizer

Recently I’ve blogged about Xamarin.Forms and how to create a XAML Behavior for enabling Multi-Touch gestures to generic elements and implementing a scale / pinch functionality.

Fortunately the framework provides three types of recognizer that greatly simplify the implementation:

  • PinchGestureRecognizer allows user interactions for zoom / scale functionalities;
  • PanGestureRecognizer enables pan / translate transformations;
  • TapGestureRecognizer detects tap events.

Yesterday I decided to try the PanGestureRecognizer for extending the capabilities of the Behavior described in the previous post.

First of all, I added two Bindable properties in order to permit activation / deactivation of individual gestures (Bindable properties are equivalent to Dependency ones in UWP XAML)

In this way we can specify in our XAML what gestures are enabled:

Then I initialised the GestureRecognizers adding a new PanGestureRecognizer to the recognizers list:

And subscribed to the PanUpdated event in order to apply the translate transform:

The implementation of this event handler permits to update the X and Y coordinates of the element when a Pan gesture is detected:

Here we go: the sample app can now be deployed to the emulators and iOS / Android / Windows devices.

Just a couple of notes:

  • deployment to iOS required this workaround to work properly since the new sample app uses different assemblies;
  • Tap gestures on Android requires Xamarin.Forms – minimum version v2.1.0.6501-pre1 as pointed by the official documentation.

As usual, the latest source code is available for download on GitHub.

Having fun with Xamarin.Forms and Multi-Touch Behaviors

Recently Xamarin has released preview support for the Universal Windows Platform in their Xamarin.Forms framework so I have been playing around with version 2.0 for testing its features and verify how easy is to target multiple platforms (iOS, Android, Windows 10 UWP, Windows Phone, Windows 8.1) with a single codebase.

One of the experiments I have done is related to custom multi-touch gestures: the idea to use a XAML Behavior is a common scenario to write well structured code so I started creating a new Cross-Platform Xamarin.Forms Portable project and upgraded the NuGet packages to the latest stable version of the framework (currently v2.0.1.6505).

I have then read the official documentation and analysed the samples available on GitHub: a very good example is the PinchGesture one so, starting from it, I created a new MultiTouchBehavior implementing this gesture and attached the same Behavior to an Image object added to a sample ContentPage, as described below in this lovely cross-platform XAML 🙂

The BindingContext=”{Binding}” is used to trigger the BindingContextChanged event and initialise correctly the GestureRecognizers  for the parent object since the AssociatedObject.Parent is set to null when the Behavior.OnAttachedTo() is called (I suppose that the XAML tree is not yet completely created when the behavior is attached in Xamarin.Forms):

Here is the project deployed to the Android, iOS and Windows 10 emulators:

MultiTouch_Android_Emulator   Simulator Screen Shot 14 Feb 2016, 18.25.00   MultiTouch_Windows10_Emulator

I’ve been particularly impressed by Xamarin.Forms: the possibility to target so many platforms using the same code is a killer feature and the development environment is also very comfortable to use.

The sample code used in this post is available on GitHub, I’m planning to add more functionalities in the future with particular regard to other common multi-touch gestures using Xamarin.Forms and XAML.

XAML Behaviors, Windows 10 UWP and Open-Source

I’ve always been a great fan of XAML Behaviors: they help following good coding practices and keeping separation of concerns in your code. Ah, did I also mention that they help to write elegant code? 😉

Good news is that XAML Behaviors have been Open-Sourced and are available for download and contributions on GitHub: more information available in the official announcement here.

I already had fun submitting a couple of Pull Requests: head over to GitHub and enjoy!

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!