RenderOptions.ClearTypeHint Attached Property
Gets or sets a value that indicates to the rendering engine whether text can be rendered with ClearType.
Assembly: PresentationCore (in PresentationCore.dll)
Use theattached property to indicate that text can be rendered with ClearType in a specific part of the visual tree.
ClearType text does not display correctly on a background that is not fully opaque. Intermediate render targets, such as Effect, OpacityMask, VisualBrush, DrawingBrush, Clip, and Opacity, can introduce backgrounds that are not fully opaque. WPF disables ClearType when it detects that the buffer into which text is drawn could have a transparent background.
Set the Enabled to indicate that a subtree is safe for ClearType text rendering. Do this only when you can be certain that the text is rendering to a fully opaque background. When an element in the subtree introduces transparency, you can enable ClearType; however, rendering issues may occur. If a portion of the subtree introduces more intermediate rendering targets, you must set again on the children of that subtree.property to
The following list shows how to make sure that text to be rendered with ClearType appears correctly.
Do not introduce intermediate render targets betweenand the text to be rendered with ClearType.
Assign an opaque background that is as close as possible in the visual tree to the text.
Be aware thatre-enables ClearType for a subtree; however, it does not force ClearType rendering.
Be aware that TextRenderingMode settings.does not override your system settings or
On many controls, theattached property has no effect unless you set an opaque background behind the text.
The following example shows how the OpacityMask property is set. In the third text block, is used, but rendering issues may occur.property affects different branches of the visual tree. In the first text block control, text is rendered with ClearType because the text block inherits the setting from the main window. In the second text block, ClearType is not used because the parent element's