Fill ComboBox with List of available Fonts
Not sure why we need to foreach
here.
IList<string> fontNames = FontFamily.Families.Select(f => f.Name).ToList();
You can use System.Drawing.FontFamily.Families
to get the available fonts.
List<string> fonts = new List<string>();
foreach (FontFamily font in System.Drawing.FontFamily.Families)
{
fonts.Add(font.Name);
}
// add the fonts to your ComboBox here