Partager via


IXRTextBlock::SetForeground (Windows Embedded CE 6.0)

1/6/2010

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 2 documentation.

.NET Framework Equivalent

System.Windows.Controls.TextBlock.Foreground

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRTextBlock
IXRTextBlock::GetForeground