Playing A Sound, Simplified

Windows Phone Tutorial

In a previous posting I discussed how to play a sound using a background process.  That is great when you need the sound to continue playing even if you leave your application. But much of the time you need something far simpler: just the ability to play a sound and be done with it.

For that, all you need is to add a MediaElement to your Xaml.  In the following sample we place two buttons on the MainPage; one to start playing the sound and one to stop it.

The trick is also to add an invisible MediaElement to the Xaml, which will be the control on which you’ll call such methods as Play() and Stop().

Continue reading

Share
Posted in Essentials, Mango, Mini-Tutorial, WindowsPhone | Tagged | Leave a comment

Yet Another Podcast #57–Kendo UI

I spoke with Burke Holland, Kendo UI Evangelist, and Todd Anglin, VP of HTML5ToddAnglin Tools for Telerik about their new platform for creating HTML5/JQuery applications: Kendo UI.

Listen | Yet Another Podcast

Call in comments: 1-347-YAP-CAST

rssiTunesalt

Share
Posted in Community, Tools and Utilities, UI | Tagged | 1 Comment

Full Stack Resumes–MVVM Design

The Full Stack project resumes with a bang as Jon Galloway and I talk with John Papa about MVVM design.

Share
Posted in Full Stack, Mango, MVVM, Video, WindowsPhone | Leave a comment

New Videos Uploaded

I’ve recently uploaded a number of new Videos in the Windows Phone 7.5 video series.  The two most recent (uploaded today) are on persisting an image and navigation within an MVVM application.

Share
Posted in Mango, WindowsPhone | Tagged | 3 Comments

Calling Navigate From The View Model

Windows Phone Mini-Tutorial

In the third part of the MVVM Light Toolkit Soup To Nuts (part 1 is here) I started with an application that had two pages, and a button on the first that was to cause a navigation to the second page.  You can download the starting source code here

In that article I explained how the VM cannot call the Navigate service, but that you could use messaging to have the View make the call.  While that is correct, there is an easier way; which is to grab the rootFrame and to call Navigate on that.

Continue reading

Share
Posted in Mango, Mini-Tutorial, Patterns & Skills | Tagged | 5 Comments

Yet Another Podcast #56–Jeff Blankenburg: Evangelist

Talking with Jeff Blankenburg about his 31 Days of Mango series and what jeff it means to be a Microsoft Evangelist. 

Listen | Yet Another Podcast

Call in comments: 1-347-YAP-CAST

rssiTunesalt

Share
Posted in Essentials | Tagged | 3 Comments

Vibrating the phone

Windows Phone Tutorial

A little vibration added to your application can be just the haptic feedback needed. It turns out that vibration is absurdly easy to add; so much so that discussions of adding vibration typically come with the caveat that you want to use it sparingly; too much of a good thing can make for a very annoying application.

To see how to add vibration to an application, let’s start by creating a new application named Vibrate. 

Continue reading

Share
Posted in Essentials, Mango, Mini-Tutorial, WindowsPhone | Tagged | 2 Comments

Binding Formatting

Windows Phone Tutorial

When you are binding data there are additional properties that allow youBindingFormatting to format the display and to handle errors and null values.

The StringFormat property allows you to add any standard .NET format string that matches the type you are binding to.

The FallbackValue instructs the binding on what to display if the binding fails.

The TargetNullValue instructs the binding on what to display if the value bound to is null.

Continue reading

Share
Posted in Data, Essentials, Mango, Mini-Tutorial, WindowsPhone | Tagged | 3 Comments

DecryptR Part 2

In a recent post, I discussed the DecryptR application I have been toying with.  DecryptR V2While the fundamentals are working, there is much to do.  Today I’ll make a few minor improvements.

First, let’s set the font in the list box to a fixed font, so that the columns align better.  To do so I’ll open the application in Expression Blend.  In the Objects and Timeline I’ll click my way down to Results- the list box and then in the Text properties window I’ll set the font family to Courier New (a fixed width font) and the font size to 24.

Continue reading

Share
Posted in Essentials, Mango, Mini-Tutorial, Patterns & Skills | Tagged | Leave a comment

Yet Another Podcast #55–David Plat on Why Software Sucks

Talking with David Platt, author of Why Software Sucks about software design, both good and bad

 

Listen | Yet Another Podcast

Call in comments: 1-347-YAP-CAST

rssiTunesalt

Share
Posted in Books, Essentials, Observations, Opinion, UI | Tagged | 2 Comments

DecryptR–A Glass House Application

 

Periodically, I like to build a “glass house” application – that is one Decrypter2which I document as I go, hiding nothing and showing all the thinking that goes into the application as well as the raw, not ready-for-production code along the way.

DecryptR

DecryptR is a game, but one which will illustrate a number of Mango features.  It will not be written in XNA, but rather will be written in Xaml and C#. 

The idea of the game is that the computer thinks of a code, using n of the first m letters of the alphabet (where n and m are configurable).  Thus, we might decide that it will use 6 of the first 8 letters (A-H).  The code does not duplicate letters, so a typical code might be ACBFED but of course the code is not displayed.  Your job is to break the code.  Each “turn” you put in 6 letters and Decrypter tells you how many you matched, and how many were in the right position. 

Continue reading

Share
Posted in Essentials, Mango, Mini-Tutorial, Patterns & Skills | Tagged | 4 Comments

Context Menu

Windows Phone Tutorial

The Silverlight For Windows Phone Toolkit is a magnificent collection of controlsContextMenu and utilities for writing Windows Phone applications.  Unfortunately, there is little or no documentation, and the samples, while wonderful, are quite complex.  At times, it is difficult to tease out how to use a control; how to “just make it work.”

As I have done in previous mini-tutorials, this posting will show one of the toolkit controls stripped down to its bare essentials.  Creating a context menu, and responding to the user’s choice in the menu turns out to be wicked easy.

Continue reading

Share
Posted in Essentials, Mango, Mini-Tutorial, Patterns & Skills, Toolkit, WindowsPhone | Tagged | 1 Comment