Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GlyphRun.GetCaretCharacterHitFromDistance Method

Retrieves the CharacterHit value that represents the character hit of the caret of the GlyphRun.

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

public CharacterHit GetCaretCharacterHitFromDistance (
	double distance,
	out bool isInside
)
public CharacterHit GetCaretCharacterHitFromDistance (
	double distance, 
	/** @attribute OutAttribute() */ /** @ref */ boolean isInside
)
You cannot use methods in XAML.

Parameters

distance

Offset to use for computing the caret character hit.

isInside

Determines whether the character hit is inside the T:System.Windows.Media.GlyphRun.

Return Value

A CharacterHit value that represents the character hit that is closest to the distance value. The out parameter isInside returns true if the character hit is inside the GlyphRun; otherwise, false.

The distance value represents the offset from the leading edge of the GlyphRun.

If the hit is outside the GlyphRun, the character hit represents the closest caret character hit within the GlyphRun.

The CharacterHit structure represents information about a character hit within a GlyphRun—the index of the first character that was hit as well as information about the leading or trailing edge.

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft