CanvasTextLayoutLineSpacingMode Property |
Namespace: Microsoft.Graphics.Canvas.Text
public CanvasLineSpacingMode LineSpacingMode { get; set; }
If this property is set to Default:
If this property is set to Uniform, then the magnitude of the LineSpacing field will affect line spacing. LineSpacing and LineSpacingBaseline are absolute quantities in DIPs.
If this property is set to Proportional, then the magnitude of the LineSpacing field will affect line spacing. LineSpacing and LineSpacingBaseline are amounts by which to scale the default line spacing and line spacing baseline, respectively.
For example, to create a text layout for double-spaced text, use
var format = new CanvasTextFormat(); var textLayout = new CanvasTextLayout("A piece of text", format, layoutWidth, layoutHeight); textLayout.LineSpacingMode = CanvasLineSpacingMode.Proportional; textLayout.LineSpacing = 2;