FontFamily.Source 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得用來建構 FontFamily 物件的字型家族名稱。
public:
property System::String ^ Source { System::String ^ get(); };
public string Source { get; }
member this.Source : string
Public ReadOnly Property Source As String
屬性值
FontFamily 物件的字型家族名稱。
範例
下列範例顯示從 FontFamily 物件擷取 BaseUri 和 Source 屬性值的結果。
// 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/".
Uri baseUri = myTextBlock.FontFamily.BaseUri;
// The value of source is "./#Pericles Light".
string source = myTextBlock.FontFamily.Source;
' 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/".
Dim baseUri As Uri = myTextBlock.FontFamily.BaseUri
' The value of source is "./#Pericles Light".
Dim source As String = myTextBlock.FontFamily.Source
備註
若要傳回物件 (URI) 值的基底統一 FontFamily 資源識別碼,請使用 BaseUri 。
FontFamily如果建立物件而不指定字型系列名稱,則傳回值為 Empty 。