RichTextBlock.OpticalMarginAlignment Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get or sets a value that indicates how the font is modified to align with fonts of different sizes.
public:
property OpticalMarginAlignment OpticalMarginAlignment { OpticalMarginAlignment get(); void set(OpticalMarginAlignment value); };
OpticalMarginAlignment OpticalMarginAlignment();
void OpticalMarginAlignment(OpticalMarginAlignment value);
public OpticalMarginAlignment OpticalMarginAlignment { get; set; }
var opticalMarginAlignment = richTextBlock.opticalMarginAlignment;
richTextBlock.opticalMarginAlignment = opticalMarginAlignment;
Public Property OpticalMarginAlignment As OpticalMarginAlignment
<RichTextBlock OpticalMarginAlignment="None"/>
-or-
<RichTextBlock OpticalMarginAlignment="TrimSideBearings"/>
A value of the enumeration that indicates how the font is modified to align at different sizes. The default is None.
When OpticalMarginAlignment is set to TrimSideBearings, the text is trimmed to the leftmost stroke of the first character and the rightmost stroke of the last character on a line. For example, an "L" has a small amount of space to the left of the vertical stroke, which scales with font size. When TrimSideBearings is set, the left of the vertical stroke is directly aligned without the spacing. This enables easier alignment to the Windows grid system as explained in Laying out an app page.
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |