Share via


IXRTextBlock::GetForeground (Compact 2013)

3/28/2014

This method retrieves the brush that paints the text in this text block control.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetForeground(
    IXRBrush **ppForeground
) = 0;

Parameters

  • ppForeground
    [out] Address of a pointer to an object derived from IXRBrush that paints the text in this text block control.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The value of ppForeground specifies the brush for the displayed 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.

To use a specific interface pointer type, you can use the helper template version of this method that XAML for Windows Embedded provides. When you supply a derived type, this version automatically supplies a type-safe method that implicitly converts the returned type from a generic interface so you do not have to explicitly call QueryInterface to convert the generic interface into the required object type.

.NET Framework Equivalent

System.Windows.Controls.TextBlock.Foreground

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTextBlock
IXRTextBlock::SetForeground