Name

FontDialog

Synopsis

This CommonDialog allows users to select a particular Font and System.Drawing.Color.

There are various properties that can permit or deny particular types of font such as AllowSimulations, AllowVectorFonts, AllowVerticalFonts, ScriptsOnly (which eliminates nontext fonts such as Wingdings) and FixedPitchOnly (which limits the list to monospaced fonts such as Courier).

In addition, there are a variety of properties to control the appearance and function of the dialog. The ShowApply property determines whether the dialog has an apply button. ShowColor enables or disables the System.Drawing.Color selector, interacting with the ShowEffects property, which determines whether the group of controls that allow you to set effects such as bold, underline, and the System.Drawing.Color, is shown.


public class FontDialog : CommonDialog {

// Public Constructors

   public FontDialog();

// Protected Static Fields

   protected static readonly object EventApply;  // =System.Object

                  // Public Instance Properties

   public bool AllowScriptChange{set; get; }

   public bool AllowSimulations{set; get; }

   public bool AllowVectorFonts{set; get; }

   public bool AllowVerticalFonts{set; get; }

   public Color Color{set; get; }

   public bool FixedPitchOnly{set; get; }

   public Font Font{set; get; }

   public bool FontMustExist{set; get; }

   public int MaxSize{set; get; }

   public int MinSize{set; get; }

   public bool ScriptsOnly{set; get; }

   public bool ShowApply{set; get; }

   public bool ShowColor{set; get; } public bool ...

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.