Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>The correct way to share resources is to create a global shared project. Create a new Project with the name <em>Resources</em>:</li> </ol> <p><img src="https://i.stack.imgur.com/yTtwi.png" alt="Solution Explorer, showing an example solution, which contains a project named *Resources*"> </p> <ol start="2"> <li>Next we must add some resources (such as icons) to the project. Do this as usual. Go to the projects setting, select tab <em>Resources</em> and <em>Add Existing File…</em> to the project. We can see that the icon is added to the project and was copied to the local folder:</li> </ol> <p><img src="https://i.stack.imgur.com/4lXIh.png" alt="For example, the Resources project&#39;s Resources tab shows a picture of a puppy, and the Solution Explorer shows that the Resources project&#39;s Resources folder includes the picture of the puppy"> </p> <ol start="3"> <li><p>Next step consists of adding this icon to the other project(s). Note the important difference, you need to add this icon as a <strong>link</strong>!</p> <p>Adding as a link avoids the resource duplication. Create a new Project within the same solution and name it e.g. <em>Main</em>. Create some folder in this new project, naming it <em>Resources</em> (the logical name for our purpose). Then right click on this folder, select <em>Add Existing Item…</em> and choose the image file from the shared project folder. Make sure to use <strong>Add As Link</strong> here! If done correctly the icon of the newly added file will look slightly different (see below):</p></li> </ol> <p><img src="https://i.stack.imgur.com/02ahr.png" alt="In the *Add Existing Item* dialog, choose the *Add As Link* option from the *Add* button&#39;s drop-down list"> </p> <p>Added resource's icon must look like this </p> <p><img src="https://i.stack.imgur.com/mOO32.png" alt="In Solution Explorer, the Main project&#39;s icon for the puppy Resource has an arrow on the icon, whereas the Resources project&#39;s icon for the puppy Resource does not have an arrow on the icon"> </p> <ol start="4"> <li>Now we must set the <em>Build Action</em> for this file to <strong><em>None</em></strong>. For this select the file and go to the <em>Properties</em> Window. There choose <em>None</em> for <em>Build Action</em>. We need to do this to avoid embedding this icon into the assembly:</li> </ol> <p><img src="https://i.stack.imgur.com/IGudj.png" alt="In Solution Explorer, change the *Main* project&#39;s puppy resource&#39;s properties. Choose a Build Action of *None*"></p> <ol start="5"> <li>Finally we need to add the linked files to the <em>Resources</em> of the corresponding project. Open the project <em>Properties</em> for the project where we just added the files. Choose the <em>Resource</em> tab and drag the linked file there:</li> </ol> <p><img src="https://i.stack.imgur.com/X3WNY.png" alt="Drag the linked image from the Solution Explorer&#39;s *Main* project&#39;s resources to the *Main* project&#39;s resources tab&#39;s viewing pane"></p> <p>These are the five simple steps you must perform to share icons between projects. You might ask "What are the benefits of this?" The benefits are:</p> <ul> <li>We store resources in one place, and</li> <li>It is easy to replace an icon with a new one.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload