/// <summary> /// Takes the photo image and FaceDetector results and assembles the visualization onto the Canvas. /// </summary> /// <param name="displaySource">Bitmap object holding the image we're going to display</param> /// <param name="foundFaces">List of detected faces; output from FaceDetector</param> private void SetupVisualization(WriteableBitmap displaySource, IList <DetectedFace> foundFaces) { this.PhotoCanvas.Background = new ImageBrush() { ImageSource = displaySource, Stretch = Stretch.Fill }; MainPage.HighlightFaces(displaySource, foundFaces, this.PhotoCanvas, this.HighlightedFaceBox); }