Niner since 2010
The above video guide included the method for nui_DepthFrameReady, but the text guide did not. It should read as follows:
void nui_DepthFrameReady(object sender, ImageFrameReadyEventArgs e)
// Convert depth information for a pixel into color information
byte ColoredBytes = GenerateColoredBytes(e.ImageFrame);
// create an image based on the colored bytes
PlanarImage image = e.ImageFrame.Image;
image1.Source = BitmapSource.Create(
image.Width, image.Height, 96, 96, PixelFormats.Bgr32,
null, ColoredBytes, image.Width * PixelFormats.Bgr32.BitsPerPixel / 8);
Sorry for the strange formatting. Channel9 does not support multiline code postings in the comments.
Just a note for a correction:
Where it says WPF, actually Wpf should not be capitalized, it's really:
And don't forget to add the reference to the Coding4Fun .dll, which can be done (after downloading the .dll from codeplex) in the Solution Explorer by right clicking References>Add Reference>Browse.
@Bill Yeager: For copies of the student files and links to demo code, you can go to the Windows Phone 7 Born To Learn Forum (http://borntolearn.mslearn.net/wp7/m/default.aspx).
There are some pdfs there that explain the materials needed for the lessons in groups of three.