This documentation is archived and is not being maintained.

FormattedText.BuildHighlightGeometry Method (Point)

Returns a Geometry object that represents the highlight bounding box of the formatted text.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)

public Geometry BuildHighlightGeometry (
	Point origin
)
public Geometry BuildHighlightGeometry (
	Point origin
)
public function BuildHighlightGeometry (
	origin : Point
) : Geometry
You cannot use methods in XAML.

Parameters

origin

The origin of the highlight region.

Return Value

The Geometry object that represents the highlight bounding box of the formatted text.

The bounding box region contains the entire formatted text area starting at the point specified by origin. The returned Geometry object contains only the bounding box of the highlighted text and does not contain any rendered text.

The following example illustrates a way to creating visual effects by modifying the stroke and highlight of converted text.

Example of an image brush applied to the stroke and highlight


Text with image brush applied to stroke

The following code example shows how to create a FormattedText object and to retrieve the geometries of the formatted text and its bounding box.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: