FontFamily.Name FontFamily.Name FontFamily.Name FontFamily.Name Property

定義

この FontFamily の名前を取得します。Gets the name of this FontFamily.

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

プロパティ値

この String の名前を表す FontFamilyA String that represents the name of this FontFamily.

次のコード例で、すべてのフォント ファミリを示しています、Familiesのプロパティ、FontFamilyクラス。The following code example shows all the font families in the Families property of the FontFamily class. この例は、Windows フォームで使用する設計されています。This example is designed to be used with a Windows Form. この例を実行するには追加、ListBoxという名前のlistBox1フォーム、および呼び出しをPopulateListBoxWithFontsフォームのコンス トラクターからメソッド。To run this example, add a ListBox named listBox1 to a form, and call the PopulateListBoxWithFonts method from the form's constructor.

private:
   void PopulateListBoxWithFonts()
   {
      listBox1->Width = 200;
      listBox1->Location = Point(40,120);
      System::Collections::IEnumerator^ myEnum = FontFamily::Families->GetEnumerator();
      while ( myEnum->MoveNext() )
      {
         FontFamily^ oneFontFamily = safe_cast<FontFamily^>(myEnum->Current);
         listBox1->Items->Add( oneFontFamily->Name );
      }
   }
private void PopulateListBoxWithFonts()
{
    listBox1.Width = 200;
    listBox1.Location = new Point(40, 120);
    foreach ( FontFamily oneFontFamily in FontFamily.Families )
    {
        listBox1.Items.Add(oneFontFamily.Name);
    }
}
Private Sub PopulateListBoxWithFonts()
    listBox1.Width = 200
    listBox1.Location = New Point(40, 120)
    Dim oneFontFamily As FontFamily
    For Each oneFontFamily In FontFamily.Families
        listBox1.Items.Add(oneFontFamily.Name)
    Next
End Sub

適用対象