Asked by:

How to save and load an image selected with OpenFileDialogue? No errors but image does not show up

Question

Hello everyone. Been at this for a while. I had it working on UWP, but having trouble on WPF. Basically I want to use OpenFileDialogue and select an image from my computer. I would then like to save a copy of that image in my application and also display
the image in an Image control. I'm using Caliburn.micro for my MVVM framework

So somebody had the right answer and I was coming back to mark it as correct, but now that answer has been deleted. For those of you looking for the answer you have to add filefoto.BeginInit(); and filefoto.EndInit();
around filefoto.UriSource=newUri(filename);

That will get it to work. However, make sure to scale the image because if you don't and it's a fairly large image who's background matches it might confuse you into thinking it's not there when really you're just staring at the corner of a huge image.