![]() MyTextBlock.FontFamily = new FontFamily("file:///d:/MyFonts/#Pericles Light") Create a new FontFamily object, using an absolute URI reference. The friendly name of the font can specify an absolute uniform resource identifier (URI) value to resolve the font reference, as shown in the following Extensible Application Markup Language (XAML) and code examples. Specifying Fonts in Alternate DirectoriesĪ Windows Presentation Foundation (WPF) application can specify a directory, other than the directory that contains the systems font collection, for resolving font references. Also, in this example the font is assumed to be in the system font collection. In the preceding example, the font that is referenced, "Comic Sans MS", is referred to by its friendly name. MyTextBlock.FontFamily = New FontFamily("Comic Sans MS") myTextBlock.FontFamily = new FontFamily("Comic Sans MS") The following examples show how to reference a font, in Extensible Application Markup Language (XAML) and in code. ![]() You define the font by setting that property with a FontFamily value. Most user interface (UI) elements, such as Button and TextBlock, provide a FontFamily property that can be used to specify a font for the text content of a control. ![]() These feature differences include Style, such as italic, and Weight, such as bold.Įxample of typefaces that are members of the "Times New Roman" font family TypeConverterAttribute LocalizabilityAttribute RemarksĪ font family is a set of typefaces that share the same family name, such as "Times New Roman", but that differ in features. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |