Pages

Wednesday, 11 July 2012

Process Lifetime Management (PLM) and Managing State in Windows 8 Metro C# Applications

In the traditional Windows environment, the user manages the lifetime of their applications. The user launches the application and it continues to run until the user decides to close it. The problem with this model is that applications continue to drain system resources, including memory and CPU, even when they are not in the foreground. This impacts the performance of the application the user is using as well as drains the battery faster when the device is not plugged in.

Windows 8 Metro applications only run when they are in the foreground. This allows the user to focus on the primary application they wish to interact with. Applications in the background go into a suspended state. In the suspended state the threads for the application are literally frozen in place. The application will no longer take up system resources or impact battery life. Most of the time, the application will remain in memory. This allows fast application switching, so when the user swipes back to a different application, it resumes immediately as if it were already running.

Read full article here

The taming of the Metro GridView

This article describes how to restyle the Metro GridView to host a single page app like the sample Weather and Finance apps. I'll show you how to get rid of the default disco effects of this control - like the swiping behavior and the pressed animation. For this article, I started with my own lightweight version of the weather app, but I got bored very soon. So I upgraded the app to a tribute to the iconic rock band CPeX, with some pictures, some overflowing RichTextBox controls with lyrics, and WebView controls revealing the band's web site and wikipedia page; there's even a YouTube video in it:

The taming of the Metro GridView

Read full article here

Handling the virtual keyboard in C#/XAML Metro app

As we saw in a previous post (http://blogs.msdn.com/b/eternalcoding/archive/2012/07/03/tips-and-tricks-for-c-metro-developers-the-flyout-control.aspx) it is really easy to create a flyout control.

But if this control is used to type text, you must consider handling the virtual keyboard in order to move your flyout so that it can always be visible:


Read full article here

Play sounds in Metro-style apps

Wordastic for Windows 8 is close to completion. As a part of enhancing the app, I updated word count from 5k to 25k. I also added some sounds. Bach in the background and some sounds depending upon correct user guess.

So I did it all and I came to the sounds… figured out how to play background music but was not how to play multiple sounds. Here’s what I did
.
I added an instance of MediaElement and set the source to sound 1. Set another 2 instance and set the source to sound 2 and sound 3.

Read full article here
Web Informer Button