private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            try
            {
                int width  = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
                int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);
                _luminance = new PhotoCameraLuminanceSource(width, height);
                _reader    = new QRCodeReader();

                Dispatcher.BeginInvoke(() =>
                {
                    qrPreviewTransform.Rotation = _photoCamera.Orientation;
                    _timer.Start();
                });
            }
            catch
            {
                _timer.Stop();
            }
        }
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            try
            {
                int width = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
                int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);
                _luminance = new PhotoCameraLuminanceSource(width, height);
                _reader = new QRCodeReader();

                Dispatcher.BeginInvoke(() =>
                {
                    qrPreviewTransform.Rotation = _photoCamera.Orientation;
                    _timer.Start();
                });
            }
            catch
            {
                _timer.Stop();
            }
        }