Click or drag to resize
DocumentSelection Methods

The DocumentSelection type exposes the following members.

Methods
  NameDescription
Public methodAddDocumentElementToSelection
Adds a specified document element to the existing selection.
Public methodAddParagraphToSelection
Adds a paragraph to the existing selection.
Public methodAddSelectionEnd
Finishes the started SelectionRange by setting its end at the specified position.

This method finishes a range started using AddSelectionStart(DocumentPosition) or SetSelectionStart(DocumentPosition).

Public methodAddSelectionStart
Begins a new SelectionRange starting at the specified position.

This method starts the creation of a range, which should be finished with AddSelectionEnd(DocumentPosition).

Public methodAddTableCellToSelection
Adds a table cell to the existing selection.
Public methodAnchorSelectionPositions
Public methodBeginUpdate
Public methodBeginUpdate(Boolean) Obsolete.
Public methodClear
Clears the selection.
Public methodContainsAnnotationMarkersOfTypeT
Determines whether the selection contains annotation markers of type T.
Public methodCopySelectedDocumentElements(Boolean)
Copies all selected document elements to a DocumentFragment instance.
Public methodStatic memberCopySelectedDocumentElements(SelectionRange)
Public methodCreateDocumentFromSelection
Creates a new document from the selected elements.
Public methodEndUpdate
Public methodEndUpdate(Boolean) Obsolete.
Public methodGetAnnotationMarkersOfTypeT
Gets all annotation markers of type T in the selection.
Public methodGetFullSelectionGeometry
Gets a [!:System.Windows.Media.Geometry] instance describing the form of the selection.
Public methodGetSelectedBoxes
Enumerates through all inline layout boxes included in the selected ranges.
Public methodGetSelectedBoxesT
Enumerates through all inline layout boxes of type T included in the selected ranges.
Public methodGetSelectedParagraphs
Gets the paragraphs included in the selection.
Public methodGetSelectedSingleInline
Gets the selected Inline if it is the only inline selected, otherwise returns null.

For example, it is suitable to check if only a ImageInline is selected.

Public methodGetSelectedText
Gets the selected text.
Public methodGetSelectedText(Boolean)
Gets the selected text.
Public methodGetVisibleSelectionGeometry
Gets a [!:System.Windows.Media.Geometry] instance describing the form of the selection visible in the visibleRectangle.
Protected methodOnSelectionChanged
Called after the selection is changed.
Protected methodOnSelectionChanging
Called before the selection is changed.
Public methodRemoveSelectionPositionsAnchor
Public methodSelectAll
Selects all elements in the document.
Public methodSelectAnnotationRange
Selects annotation range including the AnnotationRangeStart and AnnotationRangeEnd elements.
Public methodSelectTableColumn(TableCell)
Creates a new selection containing all the cells at the table grid column index of the specified table cell.
Public methodSelectTableColumn(Table, Int32)
Creates a new selection containing all the cells at a specified table grid column index.

The table grid is the set of grid columns which define all of the shared vertical edges of the table.

Public methodSelectTableRow
Creates a new selection containing the specific table row.
Public methodSetSelectionStart
Empties the selection and begins a new SelectionRange starting at the specified position.

This method starts the creation of a range, which should be finished with AddSelectionEnd(DocumentPosition).

Public methodToString
Gets the text from the selected document elements.
(Overrides ObjectToString.)
Top
See Also