Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

19. WPF Graphics > Static Font Classes

Static Font Classes

It’s considered polite for standard business applications to use the typefaces the user has chosen in the Windows control panel, but prior to WPF, that was a pretty tricky exercise. It was difficult enough just figuring out what fonts the user had installed. But the FCL makes it easy through two static classes, System.Windows.SystemFonts, which exposes the fonts the user has selected in Windows, and the System.Windows.Media.Fonts class that, in addition to letting you load fonts from any location, also exposes static collection properties that tell you all the font families and typefaces in the default Windows font directory.

image

Unfortunately, to use these two classes effectively, you need to understand resources and data-binding, and we haven’t looked at those yet. So for now, just remember that they’re there when you need them, and we’ll come back to then in the next few chapters.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint