Click or drag to resize
CanvasTextLayoutSetColor Method
Sets the color associated with a group of characters in the text layout.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void SetColor(
	int characterIndex,
	int characterCount,
	Color color
)

Parameters

characterIndex
Type: SystemInt32
characterCount
Type: SystemInt32
color
Type: Windows.UIColor
Remarks

This color takes effect while calling DrawTextLayout(CanvasTextLayout, Single, Single, ICanvasBrush) It overrides the brush or color passed to DrawTextLayout.

Calling GetBrush(Int32) for this same index, after calling this method, will yield a CanvasSolidColorBrush with the appropriate color.

A color set using this method replaces any brush currently set to those characters using SetBrush(Int32, Int32, ICanvasBrush) or SetCustomBrush(Int32, Int32, Object).

See Also