简体   繁体   中英

Visual Studio 2012 uploading image WPF

How do I upload an image in a WPF application written using Visual Studio 2012?

In 2010, there was a button that you clicked on the source property for the directory and you'd just go to the path of the image. That is not the case for 2012, so does anyone know how to do it.

With WPF, there isnt a PictureBox control, but there is an Image control, and then in Properties, under the common group of properties there is a source drop down list. If your image is not added to your solution, then this will be blank.

Create a Resources Folder if one doesnt exist, and then add an existing item, ie your image then go back to the source drop down list and the image will be there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM