.NET Framework Class Library for Silverlight
FontSource Class

Represents one or more fonts created from a stream.

Namespace:  System.Windows.Documents
Assembly:  System.Windows (in System.Windows.dll)
Syntax

Visual Basic (Declaration)
Public Class FontSource
Visual Basic (Usage)
Dim instance As FontSource
C#
public class FontSource
Remarks

The stream can contain the contents of a single font file, or a zip file containing a set of fonts. Obfuscated fonts are only supported within zip files.

Streams might be stored and retrieved from isolated storage, or could come from a stream in a StreamResourceInfo obtained from Application..::.GetResourceStream.

Using a FontSource to supply a value for TextBox..::.FontSource or TextBlock..::.FontSource is an alternative technique to specifying a URI portion for a FontFamily to reference a font file. This gives you more options for packaging or obtaining a font file. Basically you obtain a stream of either a font file or a zip of font files, and set FontSource using that stream. This makes that font file available to the TextBox or TextBlock object. You can then set Control..::.FontFamily or TextBlock..::.FontFamily with a simple fontFamilyName string to reference one of the specific families in the current FontSource value.

Inheritance Hierarchy

System..::.Object
  System.Windows.Documents..::.FontSource
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference

Other Resources

Tags :


Page view tracker