Provides options for controlling the rendering behavior of text, which can be set through an attached property usage on a wide range of Silverlight types.
Assembly: System.Windows (in System.Windows.dll)
Thetype exposes the following members.
|GetTextFormattingMode||Gets the TextFormattingMode for the specified FrameworkElement.|
|GetTextHintingMode||Gets the TextHintingMode for this FrameworkElement.|
|GetTextRenderingMode||Gets the TextRenderingMode for the specified FrameworkElement.|
|SetTextFormattingMode||Sets the TextFormattingMode for the specified FrameworkElement.|
|SetTextHintingMode||Sets the TextHintingMode for this FrameworkElement.|
|SetTextRenderingMode||Sets the TextRenderingMode for this FrameworkElement.|
By default, Silverlight optimizes text for readability. Although this is usually desirable, the rendering behavior that optimizes readability can have a large performance impact when you animate text. This is because during animation Silverlight is constantly redrawing the optimized text, and this optimization takes significant resources. When animating text, you will likely get better performance by turning off this readability optimization. To turn off readability optimization on a per-element basis, set the TextOptions.TextHintingMode attached property to Animated and then set it back to Fixed when the animation ends.
Animation that applies to text is not necessarily limited to properties of text elements. The most obvious example of a text property that can benefit from Animated behavior when animated is TextElement.FontSize (or other FontSize properties on specific types). But it might also be beneficial to set Animated behavior whenever any container that contains text animates a property that affects rendering and layout. For example, if you apply a TranslateTransform to a Grid that contains text, that animation may look better if you set TextOptions.TextHintingMode to Animated on that Grid container.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.