IXRTextBlock::SetForeground (Compact 2013)

3/28/2014

This method sets the Brush to use to paint the text in this text block.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetForeground(
    IXRBrush *pForeground
) = 0; 

Parameters

  • pForeground
    [in] Pointer to an object derived from IXRBrush that paints the text in this text block.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The value of pForeground sets the Brush for the rendered text. A Brush can represent a solid color, a linear or radial gradient, or an image.

When you animate the foreground text, you must use indirect targeting syntax. For more information about how to set the foreground Brush or a text block in XAML, see the Microsoft Silverlight 3 documentation.

.NET Framework Equivalent

System.Windows.Controls.TextBlock.Foreground

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTextBlock
IXRTextBlock::GetForeground