System.Windows.Forms.GroupBox.UseCompatibleTextRendering Property

Gets or sets a value that determines whether to use the System.Drawing.Graphics class (ndptecgdiplus) or the System.Windows.Forms.TextRenderer class (ndptecgdi) to render text

Syntax

[System.ComponentModel.DefaultValue(false)]
public bool UseCompatibleTextRendering { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The UseCompatibleTextRendering property is intended to provide visual compatibility between Windows Forms controls that render text using the System.Windows.Forms.TextRenderer class and net_v10_short and net_v11_short applications that perform custom text rendering using the System.Drawing.Graphics class. In most cases, if your application is not being upgraded from net_v10_short or net_v11_short, it is recommended that you leave UseCompatibleTextRendering set to the default value of false.

The ndptecgdi based System.Windows.Forms.TextRenderer class was introduced in the dnprdnlong to improve performance, make text look better, and improve support for international fonts. In earlier versions of the dnprdnshort, the ndptecgdiplus based System.Drawing.Graphics class was used to perform all text rendering. ndptecgdi calculates character spacing and word wrapping differently from ndptecgdiplus. In a Windows Forms application that uses the System.Drawing.Graphics class to render text, this could cause the text for controls that use System.Windows.Forms.TextRenderer to appear different from the other text in the application. To resolve this incompatibility, you can set the UseCompatibleTextRendering property to true for a specific control. To set UseCompatibleTextRendering to true for all supported controls in the application, call the Application.SetCompatibleTextRenderingDefault(bool) method with a parameter of true.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0