Tag Archives: Windows Phone

MVVM Framework explorer updated

I just updated my MVVM frameworks explorer Silverlight application. You can find the updated application here.

Here is the top 5 of MVVM frameworks supporting WPF, Silverlight and Windows Phone 7:

  1. MVVM Light (61k downloads)
  2. nRoute (19k downloads)
  3. Caliburn Micro (18k downloads)
  4. Simple MVVM toolkit (5k downloads)
  5. Catel (5k downloads)

[WP7] Using the camera in the emulator

In the very first release of the SDK for Windows Phone 7 development, it was not possible to use the camera in the emulator. The latest version of the SDK fixes this problem.

Windows Phone 7 SDK comes with a set of Task (in the Microsoft.Phone.Tasks namespace). A task can be launched from your application in order to perform some work. Currently available tasks are:

In order to launch a task from your application, all you need to do is to instantiate the associated type and call the Show() method.

Here is a sample code which launchs the StartCameraTask and then gets the capture images in order to use it in a standard Silverlight Image control:

// launch the camera capture when the user touch the screen
this.MouseLeftButtonUp += (s, e) => new CameraCaptureTask().Show();

// this static event is raised when a task completes its job
ChooserListener.ChooserCompleted += (s, e) =>
{
    var taskEventArgs = (TaskEventArgs)e;
    var photoStream = taskEventArgs.Result.ChosenPhoto;

    var bitmapImage = new BitmapImage();
    bitmapImage.SetSource(photoStream);

    this.image.Source = bitmapImage;
};

The image is just a standard Silverlight Image control:


The emulator while the task is running:

The captured image (shown once the task has completed):

If you haven’t download the tool already, go ahead and grab them ! Everything is available for free in a single download at http://developer.windowsphone.com/windows-phone-7-series/.

Hope this helps 🙂

Note: even though the StartCameraTask is now working, this is not yet the case for all the tasks…

Mix10 : first Windows Phone application using Blend4

You’ll need not more than a couple of minutes to download and install all the tools needed to create your first Windows Phone application using Blend.

Here is a tour in images:

Welcome in Blend 4

Discovering new projects templates in the Welcome dialog:

It must be quite familiar to you if you’re working with WPF or Silverlight

Choosing a target

Launching the app in the emulator

App.xaml file has all the resources for the Windows Phone theme

Let’s go now and play with the tools 🙂