Click or drag to resize
CanvasTextLayoutSetBrush Method
Sets the brush 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:

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

The brush is allowed to be null. Setting a group of characters' brush to null causes the default behavior, where the brush passed to DrawTextLayout determines the color of the text.

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

See Also