#AZURE Hello Face: Windows 8.1 apps and MVVM (6)

Hello!

New post for Azure Machine Learning Face APIs series

1. Face APIs in Azure

2. Hello Face: Face APIs in a Console App

3. Hello Face: Face APIs in a WPF App

4. Hello Face: Face APIs in a Windows 8.1 App

5. Hello Face: Frame in each detected face in Windows 8.1 App

6. Hello Face: Windows 8.1 Apps and MVVM

Some people wants to see the world on fire, and most of them usually doesn’t care about simplicity. In example, for a simple app with a view and a button, they add an unnecessary infrastructure which really doesn’t add any value (my post about Scrum is not for beginners may be can explain this topic). So if we need to Upgrade my previous sample, to be used with an MVVM pattern, one solution can be these one.

First we need to create a Canvas Collection, and complete some face location information for each Canvas, like width and height. BTW, try to create a data binding for a Margin is almost impossible.

I added some transparency into the background color of the Canvas so it will be added in a cool way over each face, In the XAML file we add an ItemsControl and complete the Items Source property with our binding.

Done ¡!! We get a new Canvas in each detected face, similar to this one.

The source code is available in GitHub https://github.com/elbruno/ProjectOxford

Saludos @ Madrid

/El Bruno

Resources:

Scrum is not for amateurs

– MSDN System.UI.Xaml.Canvas

Advertisements

11 thoughts on “#AZURE Hello Face: Windows 8.1 apps and MVVM (6)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.