/// <summary>
        /// Updates the preview position and rotation.
        /// </summary>
        private void UpdatePreviewPosition()
        {
            // Apply a mirror effect for front facing camera.
            double scaleX = this.cameraType == CameraType.FrontFacing ? -1.0 : 1.0;

            if (this.PreviewBrush != null)
            {
                int angle = OrientationHelper.GetRotationAngle(this.orientation);
                this.PreviewBrush.RelativeTransform = new CompositeTransform {
                    CenterY = 0.5, CenterX = 0.5, Rotation = angle, ScaleX = scaleX
                };
            }

            // Update the slide off animation with the correct starting and ending points.
            this.ReviewImageSlideOffTranslateStart.Value = this.LivePreviewTransform.TranslateX;
            this.ReviewImageSlideOffTranslateEnd.Value   = this.ReviewImageSlideOffTranslateStart.Value - this.ActualWidth;
        }