本文整理汇总了C#中System.Windows.Media.FontFamily.BaseUri属性的典型用法代码示例。如果您正苦于以下问题:C# FontFamily.BaseUri属性的具体用法?C# FontFamily.BaseUri怎么用?C# FontFamily.BaseUri使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Windows.Media.FontFamily
的用法示例。
在下文中一共展示了FontFamily.BaseUri属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FontFamily
// Create a new FontFamily object, using a font in the system fonts collection.
myTextBlock.FontFamily = new FontFamily("Comic Sans MS");
// The value of baseUri is null.
Uri baseUri = myTextBlock.FontFamily.BaseUri;
// Create a new FontFamily object, using an absolute URI reference.
myTextBlock.FontFamily = new FontFamily("file:///d:/MyFonts/#Pericles Light");
// The value of baseUri is null.
baseUri = myTextBlock.FontFamily.BaseUri;
// Create a new FontFamily object, using a base URI reference and a relative URI reference.
myTextBlock.FontFamily = new FontFamily(new Uri("pack://application:,,,/resources/"), "./#Pericles Light");
// The value of baseUri.AbsoluteUri is "pack://application:,,,/resources/".
baseUri = myTextBlock.FontFamily.BaseUri;