Gets or sets the preferred top-level font family for the content in this element.
<object FontFamily="fontFamily" .../>
value = object.FontFamily
object.FontFamily = value
A FontFamily object specifying the preferred font family, or a primary preferred font family with one or more fallback font families.
This property is read/write. The default value is "Portable User Interface", which is used as an alias for the font family value of "Lucida Sans Unicode, Lucida Grande".
|fontFamilyName||A string that names the primary font.|
|fallbackFontFamilyName||A string that names the fallback font. More than one fallback can be specified. Commas separate each font family string (commas are never part of the font family name itself).|
Fonts that are available or packaged with Silverlight 1.0
- Arial Black
- Comic Sans MS
- Courier New
- Lucida Grande
- Lucida Sans Unicode
- Times New Roman
- Trebuchet MS
Lucida Grande and Lucida Sans Unicode are aliases for the same font.
A font family is a set of typefaces that share the same family name, such as "Times New Roman", but that differ in features. These feature differences include font style, such as italic, and font weight, such as bold. The following illustration shows typefaces that are members of the "Times New Roman" font family.
Times New Roman font family
The following illustration shows the nine fonts that are supported by Silverlight text elements.
Supported fonts for text elements
The SetFontSource method can be used as a way of adding downloaded font content to the existing collection of type faces for Silverlight text elements. The downloaded content can either be an individual font file or packaged content, such as a Zip file, that contains one or more font files. For more information, see Using a Downloader Object.
Note As with most types of software, font files are licensed, rather than sold, and licenses that govern the use of fonts vary from vendor to vendor. As a developer it is your responsibility to ensure that you have the required license rights for any font you embed within a document or application, or otherwise redistribute.
LineBreak is listed in the Applies To list for this property, because it does exist in the object model and you can get and set it. However, all LineBreak properties are ignored for rendering purposes.