CogentP
CogentP

Reputation: 259

VisualStudio WPF. Adding a folder into output directory

I need to create a Folder with Wallpapers. This needs to be placed into the output directory so that users can then add their own images.

So my question is:

How can i place a folder in my output directory? (this should work in debug and release)

For the second part of the question I can handle on my own, which would be to bring all the items in that folder and present it to the user to chose.

Upvotes: 2

Views: 1376

Answers (2)

John Bowen
John Bowen

Reputation: 24453

Setting items in the folder in your project (assuming you have some default wallpapers) to Build Action = Content, Copy to Output Directory = Copy Always/Copy if Newer will place them inside that same folder structure in your output directory. If you don't already have files there you could add something like a ReadMe.txt with instructions on adding images that could serve the same purpose.

Upvotes: 3

jmcilhinney
jmcilhinney

Reputation: 54417

Add a folder to your project and then set its Copy To Output Directory property appropriately.

Upvotes: 0

Related Questions