Docsv3.31.0
Back to API Reference
Struct

CapturedSelection

sealed

A field's selection captured for a replacement that arrives later — from a web request or another app. Replace lands only while the field still holds the text the capture was taken from.

public bool Replace(string text)

Replaces the captured selection with text as a plain-text paste does — input filters, length limits and one undo step included — and reports whether it did: false once the field is destroyed or its text has changed since the capture. An empty text deletes the selection.