The Importance of Following the Tutorial

05.03.2009 • 09:58 • permalinkComments (0)

Last night I spent a good hour and a half trying to use a custom font for a Silverlight application without luck. It was supposed to be a simple matter, just include a font file in the project, set its build action to Resource and reference it in the XAML. But for some reason it refused to recognize the presence of the font file no matter what I tried.

After several different fonts and going through most of the possible build actions for them I gave up, attributing it to some strange fluke in my particular development environment. A little later I figured I should go over one of the tutorials one more time to see if there was some tiny point I'd missed. It turned out there was.

Add Existing ItemAll the tutorials which I'd followed instructed me to add the font file to the project using the Add New Item option shown above. Not giving this much thought I just dragged the font file unto the project which seemed to work fine. While there is no apparent difference between the two methods, switching to the prescribed approach solved my problems. Who would have known?

Comments

Name:

Comment (no HTML):