Windows apps
Collapse the table of content
Expand the table of content
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.

TextPointer.HasValidLayout Property


Gets a value that indicates whether the text container associated with the current position has a valid (up-to-date) layout.

Namespace:   System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool HasValidLayout { get; }

Property Value

Type: System.Boolean

true if the layout is current and valid; otherwise, false.

When necessary, operations that depend on a valid layout (such as the GetLineStartPosition method, GetCharacterRect method, and IsAtLineStartPosition property) attempt to automatically regenerate a valid layout before proceeding with the operation. Regenerating a layout can be a relatively expensive operation. Use this property to check for a valid layout before performing operations that may regenerate the layout. For more information, see Layout.

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft