TextRange.Select(TextPointer, TextPointer) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
업데이트된 선택 영역을 나타내기 위해 두 TextPointer 위치를 사용하여 현재 선택 영역을 업데이트합니다.
public:
void Select(System::Windows::Documents::TextPointer ^ position1, System::Windows::Documents::TextPointer ^ position2);
public void Select(System.Windows.Documents.TextPointer position1, System.Windows.Documents.TextPointer position2);
member this.Select : System.Windows.Documents.TextPointer * System.Windows.Documents.TextPointer -> unit
Public Sub Select (position1 As TextPointer, position2 As TextPointer)
매개 변수
- position1
- TextPointer
업데이트된 선택 영역의 한쪽 끝을 표시하는 고정 앵커 위치입니다.
- position2
- TextPointer
업데이트된 선택 영역의 다른 쪽 끝을 표시하는 이동 가능한 위치입니다.
예외
동일한 문서 내에 위치하지 않을 때 position1position2 발생합니다.
을 사용하는 경우 발생 position1position2합니다null.
설명
A TextRange 는 TextPointers가 나타내는 두 위치 사이의 선택 영역에서 형성됩니다. 이러한 위치 중 하나(표시된 position1위치)는 선택 영역과 관련하여 고정되지만 다른 위치(표시된 position2위치)는 이동 가능합니다. 이는 마우스 또는 키보드를 사용하여 사용자가 선택한 항목이 동작하는 방식과 유사합니다.
새 선택 영역의 실제 끝은 새 현재 선택 영역이 포함된 문서에 적용할 수 있는 선택 추론과 일치하도록 조정할 수 있습니다.