Fonts.GetTypefaces Yöntem

Tanım

Belirtilen dizin konumundan Typeface nesne koleksiyonunu döndürür.

Aşırı Yüklemeler

GetTypefaces(String)

Yazı tipi dizini konumunu temsil eden bir dize değerinden nesne koleksiyonunu Typeface döndürür.

GetTypefaces(Uri)

Yazı tipi konumunu temsil eden tekdüzen kaynak tanımlayıcısı (URI) değerinden bir nesne koleksiyonu Typeface döndürür.

GetTypefaces(Uri, String)

Yazı tipi konumunu çözümlemek için temel tekdüzen kaynak tanımlayıcısı (URI) değeri kullanan bir nesne koleksiyonu Typeface döndürür.

GetTypefaces(String)

Yazı tipi dizini konumunu temsil eden bir dize değerinden nesne koleksiyonunu Typeface döndürür.

public:
 static System::Collections::Generic::ICollection<System::Windows::Media::Typeface ^> ^ GetTypefaces(System::String ^ location);
public static System.Collections.Generic.ICollection<System.Windows.Media.Typeface> GetTypefaces (string location);
static member GetTypefaces : string -> System.Collections.Generic.ICollection<System.Windows.Media.Typeface>
Public Shared Function GetTypefaces (location As String) As ICollection(Of Typeface)

Parametreler

location
String

Yazı tiplerini içeren konum.

Döndürülenler

ICollection<Typeface>

ICollection<T> içindeki locationyazı tiplerini temsil eden nesnelerden biriTypeface.

Özel durumlar

şeklindedir location null. Bu parametre bir yol veya URI olarak kabul edildiğinden geçiremezsiniz null.

Örnekler

Aşağıdaki örnekte, bir yazı tipi konumundan nesne koleksiyonunu döndürmek için bu yöntemin Typeface nasıl kullanılacağı gösterilmektedir.

foreach (Typeface typeface in Fonts.GetTypefaces("D:/MyFonts/"))
{
    // Perform action.
}
For Each typeface As Typeface In Fonts.GetTypefaces("D:/MyFonts/")
    ' Perform action.
Next typeface

Şunlara uygulanır

GetTypefaces(Uri)

Yazı tipi konumunu temsil eden tekdüzen kaynak tanımlayıcısı (URI) değerinden bir nesne koleksiyonu Typeface döndürür.

public:
 static System::Collections::Generic::ICollection<System::Windows::Media::Typeface ^> ^ GetTypefaces(Uri ^ baseUri);
public static System.Collections.Generic.ICollection<System.Windows.Media.Typeface> GetTypefaces (Uri baseUri);
static member GetTypefaces : Uri -> System.Collections.Generic.ICollection<System.Windows.Media.Typeface>
Public Shared Function GetTypefaces (baseUri As Uri) As ICollection(Of Typeface)

Parametreler

baseUri
Uri

Yazı tiplerinin konumunun temel URI değeri.

Döndürülenler

ICollection<Typeface>

ICollection<T> içindeki baseUriyazı tiplerini temsil eden nesnelerden biriTypeface.

Örnekler

Aşağıdaki örnekte, temel URI konumundan nesne koleksiyonunu döndürmek için bu yöntemin Typeface nasıl kullanılacağı gösterilmektedir.

foreach (Typeface typeface in Fonts.GetTypefaces("file:///D:/MyFonts/"))
{
    // Perform action.
}
For Each typeface As Typeface In Fonts.GetTypefaces("file:///D:/MyFonts/")
    ' Perform action.
Next typeface

Bir uygulamanın kaynaklarındaki nesne koleksiyonunu Typeface döndürmek için aşağıdaki örnekte gösterilen "pack://application" URI gösterimini kullanın.

foreach (Typeface typeface in Fonts.GetTypefaces(new Uri("pack://application:,,,/")))
{
    // Perform action.
}
For Each typeface As Typeface In Fonts.GetTypefaces(New Uri("pack://application:,,,/"))
    ' Perform action.
Next typeface

Şunlara uygulanır

GetTypefaces(Uri, String)

Yazı tipi konumunu çözümlemek için temel tekdüzen kaynak tanımlayıcısı (URI) değeri kullanan bir nesne koleksiyonu Typeface döndürür.

public:
 static System::Collections::Generic::ICollection<System::Windows::Media::Typeface ^> ^ GetTypefaces(Uri ^ baseUri, System::String ^ location);
public static System.Collections.Generic.ICollection<System.Windows.Media.Typeface> GetTypefaces (Uri baseUri, string location);
static member GetTypefaces : Uri * string -> System.Collections.Generic.ICollection<System.Windows.Media.Typeface>
Public Shared Function GetTypefaces (baseUri As Uri, location As String) As ICollection(Of Typeface)

Parametreler

baseUri
Uri

Yazı tiplerinin konumunun temel URI değeri.

location
String

Yazı tiplerini içeren konum.

Döndürülenler

ICollection<Typeface>

ICollection<T> Typeface Çözümlenen yazı tipi konumundaki yazı tiplerini temsil eden nesnelerden biri.

Örnekler

Aşağıdaki örnekte, çözümlenen yazı tipi konumundan nesne koleksiyonunu Typeface döndürmek için bu yöntemin nasıl kullanılacağı gösterilmektedir. Bu durumda, uygulama "resources" adlı bir alt dizin içerir.

foreach (Typeface typeface in Fonts.GetTypefaces(new Uri("pack://application:,,,/"), "./resources/"))
{
    // Perform action.
}
For Each typeface As Typeface In Fonts.GetTypefaces(New Uri("pack://application:,,,/"), "./resources/")
    ' Perform action.
Next typeface

Şunlara uygulanır