Syncfusion.Windows.Forms.Grid Namespace > GridControlBase Class : UseGdiPlusRightAlignedTextWorkaround Property

UseGdiPlusRightAlignedTextWorkaround Property

Gets or sets a value indicating whether UseGdiPlusRightAlignedTextWorkaround implements a work-around for a GDI+ known issue with right-aligned text and DrawString.
Public Shared Property UseGdiPlusRightAlignedTextWorkaround As Boolean
Dim value As Boolean
GridControlBase.UseGdiPlusRightAlignedTextWorkaround = value
value = GridControlBase.UseGdiPlusRightAlignedTextWorkaround
public static bool UseGdiPlusRightAlignedTextWorkaround {get; set;}
When you have cells with right-aligned text some words are not aligned at the right border as you would expect. This is because of GDI+ designed behavior, and the degree of the problem varies from font to font. You can see this behavior for example with regular System.Windows.Forms.Label controls. Since Essential Grid relies on GDI+, it exhibits the same behavior. Besides using a Mono spaced Font, some include using either anti aliased string drawing or explicitly measuring the string width and not relying on DrawString to draw the text right-aligned.

When you enable UseGdiPlusRightAlignedTextWorkaround then the static cell renderer will use the measure string width workaround. However, this will slow down drawing of right-aligned text.


Syncfusion.Grid.Windows: 17.3460.0.14

See Also