OpticalMarginAlignment enumeration

Applies to Windows and Windows Phone

Specifies how side bearing values in per-character typography are handled when aligning to a text container boundary.

Syntax


public enum OpticalMarginAlignment

Attributes

[Version(0x06030000)]
[WebHostHidden()]

Members

The OpticalMarginAlignment enumeration has these members.

MemberValueDescription
None0

Use side bearings that come from font typography values. This is the default.

TrimSideBearings1

Don't use side bearings that come from font typography values, and align the side of the glyph to where the "ink" part of the glyph begins.

Remarks

This enumeration is used as a value by TextBlock.OpticalMarginAlignment and RichTextBlock.OpticalMarginAlignment.

When fonts of different sizes are aligned vertically in the same or nearby containers, the advance width and side bearing of the characters can cause the alignment to appear ragged. This can be prevented by setting a property that uses OpticalMarginAlignment to use the TrimSideBearings constant.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

TextBlock.OpticalMarginAlignment
RichTextBlock.OpticalMarginAlignment

 

 

Show:
© 2014 Microsoft