WPF how users add images
What is the best way to allow a user to insert photos for an image viewer? The end result I am looking for would be thumbnails in a listbox that when selected would open in a viewbox. I understand the binding开发者_如何学Python, but I don't know how to get the photos to a folder or whatever from the user.
It's not very clear from your question, but if you want the user to select a photo on their disk and then show it, use the OpenFileDialog
to choose the file and then use Image
with Source
set to a BitmapSource
with UriSource
set to the filename of the selected image (as shown in the Examples section of docuementation for Image
).
精彩评论