Application Bar Buttons Are Null

Windows Phone From Scratch #50

In a recent posting, I demonstrated how easy it is to add buttons to the phone’s Application Bar.

I went back to that application to disable the “faster” button when the maximum speed was reached. I named the button and then tried to access that button in code. Much to my surprise, the button was null. It was always null.

Continue reading →

Posted in Essentials, Mini-Tutorial, WindowsPhone | Tagged , | 4 Comments

Keynoting at Pre-Mix ROCK in SoCal

I’m very proud to announce that I’ll be delivering the Sunday morning Rockkeynote at the Rockstars in Orange County Kickstart (ROCK) event. 

There are free sessions and a number of excellent presentations planned. Be sure to rsvp for each session if you can attend. 

[ Note, I speak at 8am on Sunday, so be sure to get lots of sleep Saturday night! ]

Posted in Patterns & Skills | Comments Off on Keynoting at Pre-Mix ROCK in SoCal

Double Dutch Double Touch

Windows Phone From Scratch #49

In my previous posting, I demonstrated how to register a touch (or tap) on Windows DoubleTouch Phone. Today I will extend that to implement Double-Touch.

To begin, I need to go back to the original Touch class and make two changes: the OnTouch method needs to be changed to protected (from private) and needs to be marked virtual so that I can override it in a derived class.

Continue reading →

Posted in Mini-Tutorial, Patterns & Skills, WindowsPhone | Tagged , | Comments Off on Double Dutch Double Touch

Windows Phone: Touch

Windows Phone From Scratch #48

A key gesture for Windows Phone users is the tap or touch on the screen.   touchMany controls have built-in support for the touch (e.g., the button) converting the touch to an existing click event.

Other controls, however, do not have such support. If you want to respond to a touch on a panel, for instance, you need to write that support for yourself. Happily, this turns out to be easy to do.  The recommended course of action is to associate the touch with the MouseLeftButtonDown, and naturally enough, the release of the touch with the MouseLeftButtonUp event, both found on the base class UIElement.

Continue reading →

Posted in Blend, Essentials, Mini-Tutorial, WindowsPhone | Tagged , , | 3 Comments

Conway’s Life In the Marketplace

I’m pleased to report that the first iteration of Conway’s Life, documented here, is now in the marketplace.  [ Updated March 24 with Faster/Slower Buttons ]

Following the conventional rules of Conway’s Game Of Life, the screen is divided into cells. Each generation a cell dies of loneliness if it has fewer than 2 neighbors, or of overcrowding if it has more than 3 neighbors.  Live cells stay alive with 2-3 neighbors, and dead cells come to life with 3 neighbors.

wp7_278x92_green

Click on the image to download to your phone or to Zune. (Free)

Posted in Community, WindowsPhone | Tagged , | 3 Comments

Linq: SelectMany

Windows Phone From Scratch #47

A LINQ Tutorial

SelectMany is a crucial operator in both LINQ and in Reactive Extensions.  It may be SelectMany easier to see what it does by focusing on LINQ, as most of us are more familiar with querying against IEnumerables.

The primary job of SelectMany is to “flatten” a list of lists.

Continue reading →

Posted in Data, Linq, Mini-Tutorial, Patterns & Skills | Tagged , | 6 Comments

Adding an Application Bar

Windows Phone From Scratch #46

In a recent posting I wrote about creating Conway’s Life for the phone.  The application AppButtons is a tinkerer’s playhouse and I find myself going back to it to add features and tweaks.

This morning I decided it would be nice to let the user slow down the interval between generations. To do this, I wanted a pair of buttons (slower and faster).  This turned out to be absurdly easy.

Continue reading →

Posted in Blend, Essentials, Mini-Tutorial, Patterns & Skills | Tagged | 2 Comments

Yet Another Podcast #29 Jon Galloway on MVC 3

Talking with Jon Galloway about ASP.NET MVC 3 and his Music Store tutorial. JGalloway Jon is a Senior Community Program Manager for Microsoft and co-host of Herding Code.

 

Listen| Return to Yet Another Podcast

Call in comments:

Posted in Community, Data, Essentials, MVC, Patterns & Skills | Tagged | Comments Off on Yet Another Podcast #29 Jon Galloway on MVC 3

Coding For Fun: Conway’s Life

Windows Phone From Scratch #45

I was feeling a bit restless yesterday, so I decided to see if I couldn’t get a first LifeSnap1 approximation of Conway’s Life cellular automaton up and running on Windows Phone.  I gave myself 1 hour to do it.  It came out okay, and today I submitted it to App Hub (I’ll let you know if it gets published) as a free app.

The premise of Conway’s “game” is to create a world in a grid. You seed the grid either at particular locations, or as I did, randomly.  You then proceed in generations.

Each generation you look at the existing cells which are deemed to be alive (red) or dead (black).  Alive cells that have fewer than 2 neighbors die of loneliness and are dead in the next generation.   Similarly, alive cells with 4 or more of the possible 8 neighbors, die of overcrowding.  Live cells with 2 or 3 neighbors live on to the next generation. Finally, dead cells with exactly three neighbors come to life in the next generation.

Continue reading →

Posted in Animation, Mini-Tutorial, Patterns & Skills, WindowsPhone | Tagged | 5 Comments

The Full Stack 9–MVVM and TDD on the Phone Client

Part 9 in the Full Stack series in which Jon and I are building an entire application from conception to delivery that includes MVC3, ASP.NET, Silverlight and Windows Phone.

Also available on Channel 9

Posted in Patterns & Skills | 1 Comment

Deferred Execution in LINQ

A LINQ Tutorial

As part of my on-going exploration of technologies related to programming Silverlight Doubler and Windows Phone, I’ve been exploring LINQ in some detail.

Today, I’d like to take a look at how LINQ queries are executed; specifically focusing on the delay in execution that makes LINQ so performant.

[Double click on image for full size]

Continue reading →

Posted in Data, Essentials, Linq, Mini-Tutorial, WindowsPhone | Tagged | 4 Comments

Yet Another Podcast #28–Jeremy Lickness

Talking with Jeremy Lickness, Silverlight MVP, certified Silverlight Developer, Seniorjeremy400 Consultant and PM for Wintellect and creator of the Sterling Database.

 

Listen| Return to Yet Another Podcast

Call in comments:  1-347-YAP-CAST

rssiTunesalt

Posted in Data, Patterns & Skills, Podcast | Tagged | 2 Comments