During today’s Windows Phone development session I encountered a problem with the application bar icons. The problem was simple: The application bar and its icons worked correctly inside the startup project but my pages inside the secondary project didn’t show the application bar icons. I had the icons inside the secondary project and I checked million times that their build action was set to Content. And that was the problem: I forgot that the application bar icons must always be inside the startup project.
I suppose this is basic stuff and I should have known better, but sometimes these just take too much time to solve so hopefully the following helps someone else fighting with the same problem.
So, to solve my problems I had to do the following:
- Move the icons from the secondary module into the startup project
- Leave the IconUri-property as it was. No component keyword, nothing.
Now the startup project contains the icons:
The secondary module project contains the page and no icons:
The page inside the secondary module references the icons as if they were inside its own project:
ReSharper will tell you that the file doesn’t exist but it still works.