Reputation: 53396
I'm trying to follow a tutorial on openXML here.
I don't follow the bit where he talks about storing an XML fragment in project resources.
He can then obtain a copy of the XML fragment easily with
String content = Properties.Resources.XmlContentForEmbedImage;
I don't know how to do this, and I've googled without finding anything? What does store the XML fragment in project resources mean?
Upvotes: 2
Views: 597
Reputation: 29632
You can accomplish this by performing the following steps:
Add a new item to your project;
Select "Resource File" as its type;
Double click (open) the newly created item;
Change the current type (begins with "String") to "Files" by clicking the drop down box;
Click "Add resource";
Change the file type to "*.*";
Choose the XML file you want to add.
The file is now added as a resource. You can use this in the manner described in your web page. The name of the resource file has become a class in your project with a property for the file.
Upvotes: 2