.NET Framework (current version)
Initializes a new instance of the
FontFamily class from the specified font family name and an optional base uniform resource identifier (URI) value. Namespace:
PresentationCore (in PresentationCore.dll)
Specifies the base URI that is used to resolve
The family name or names that comprise the new
FontFamily. Multiple family names should be separated by commas.
familyName value can specify a relative URI value, which requires a base URI to resolve the font reference. The baseUri value can be null.
The following code shows a font reference that is composed of a base URI value and a relative URI value.
// The font resource reference includes the base URI reference (application directory level),
// and a relative URI reference.
myTextBlock.FontFamily = new FontFamily( new Uri( "pack://application:,,,/"), "./resources/#Pericles Light");
.NET Framework Available since 3.0 Return to top