I have developed a C# application – I want to now add a menu to it and have an option where the user can select which font they want which labels, etc will then be displayed in. So on my menu bar i added a Font and then the following in its method. I had read on net that this would work. However I am getting FontSelector/Fonts does not exist in current context. Is there a using directive i must add in order to get this too work and does anyone know what it is?
private void SetFontToolStripMenuItem_Click(object sender, EventArgs e)
{
FontSelector.ItemsSource = Fonts.SystemFontFamilies;
}
Why don’t you use System.Windows.Forms.FontDialog? Saves you a lot of work …
http://msdn.microsoft.com/en-us/library/system.windows.forms.fontdialog.aspx
It’s a dialog form you can open, that enables the user to set a font family, size, color, etc. example: