Please change your code in the following format.
Image imgPhoto = new Image();
BitmapImage bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.UriSource = new Uri("c:\\Temp\test.jpg");
bitmap.EndInit();
imgPhoto.Source = bitmap;
Hope the above solution helps.