Version

Selection Class Members

The following tables list the members exposed by Selection.

Public Properties
 NameDescription
Public PropertyCellsReturns an IEnumerable of TableCellNodes that represent the table cells included in the current selection. (read only)  
Public PropertyCharacterSettingsReturns the CharacterSettings associated with the text contained in the Range. (read only)  
Public PropertyCharacterStyleIdReturns/sets the ID of the CharacterStyle associated with the characters in the Range.  
Public PropertyDocumentReturns the RichTextDocument associated with the Range.  
Public PropertyDocumentSpanReturns a DocumentSpan that corresponds to the selection's Range. (read only)  
Public PropertyEndReturns/sets the ending character position of the Range.  
Public PropertyIsActiveReturns whether the view associated with the selection is active. (read only)  
Public PropertyLengthReturns the length of the Range. (read only)  
Public PropertyParagraphsReturns an enumerable list of ParagraphNodes that represents all the paragraphs in the Range. (read only)  
Public PropertyParagraphSettingsReturns a ParagraphSettings instance associated with the paragraphs in the Range. (read only)  
Public PropertyParagraphStyleIdReturns/sets the ID of the ParagraphStyle associated with the paragraphs in the Range.  
Public PropertyRangeReturns a Range that represents a portion of the associated RichTextDocument. (read only)  
Public PropertyRangesReturns all the Ranges currently selected in the associated RichDocumentView. (read only)  
Public PropertyRowsReturns an IEnumerable of TableRowNodes that represent the table rows included in the current selection. (read only)  
Public PropertyStartReturns/sets the starting character position of the Range.  
Public PropertyTextReturns/sets the text associated with the Range.  
Public Methods
 NameDescription
Public MethodAlignParagraphContentCenterCenter aligns content in the paragraph(s) that intersect the current selection.  
Public MethodAlignParagraphContentJustifiedJustifies content in the paragraph(s) that intersect the current selection.  
Public MethodAlignParagraphContentLeftLeft aligns content in the paragraph(s) that intersect the current selection.  
Public MethodAlignParagraphContentRightRight aligns content in the paragraph(s) that intersect the current selection.  
Public MethodApplyAllCapsFormattingAdds 'all caps' formatting to the text in the current selection.  
Public MethodApplyBoldFormattingAdds bold formatting to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyDoubleStrikethroughFormattingApplies DoubleStrikethrough formatting to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyFontApplies the specified font to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyFontSizeApplies the specified font size to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyFontUnderlineFormattingApplies the specified UnderlineType to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyItalicFormattingApplies italic formatting to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyParagraphListStyleApplies the specified list style Id to the paragraph(s) that intersect the current selection.  
Public MethodApplyParagraphShadingApplies the specified Shading to the paragraph(s) that intersect the current selection.  
Public MethodApplySingleStrikethroughFormattingApplies SingleStrikethrough formatting to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplySmallCapsFormattingAdds 'small caps' formatting to the text in the current selection.  
Public MethodApplySubscriptFormattingAdds superscript formatting to the text in the current selection.  
Public MethodApplySuperscriptFormattingAdds superscript formatting to the text in the current selection.  
Public MethodApplyTextForecolorApplies the specified forecolor to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyTextHighlightColorApplies the specified highlight color to the text in the word at the current Start location. If there is a non-zero length selection then only text in the current selection is formatted.  
Public MethodApplyVerticalAlignmentApplies the specified System.Windows.VerticalAlignment to the text in the current selection.  
Public MethodCanPasteDetermines whether the content from the clipboard can be pasted into the selection.  
Public MethodClearParagraphListStyleClears the paragraph list style setting (if any) on the paragraph(s) that intersect the current selection.  
Public MethodCollapseCollapses a Range to the starting or ending position.  
Public MethodCopyCopies the selected content to the clipboard.  
Public MethodCutCuts the selected content and places it on the clipboard.  
Public MethodDecreaseIndentDecrease the indentation of the paragraph(s) contained in the current selection.  
Public MethodDecreaseListIndentDecrease the indentation of the list that contains the Selection Start. If the Selection Start is not within a list then no action is performed.  
Public MethodDecreaseParagraphOrListIndentIf the selection start is not within the first paragraph of a list, this method does the same thing as the DecreaseIndent method. If the selection start is within the first paragraph of a list, this method does the same thing as the DecreaseListIndent method.  
Public MethodDeleteCurrentCharacterDeletes the character at the current Startlocation. If there is a non-zero length selection, the selected text is deleted.  
Public MethodDeletePreviousCharacterDeletes the character preceding the Start location. If there is a non-zero length selection, the selected text is deleted.  
Public MethodDeleteToBeginningOfCurrentWordDeletes all text from the Start location to the beginning of the current word (if the Start location is in the middle of a word), or deletes the previous word if the Start location is at the beginning of a word. If there is a non-zero length selection, the selected text is deleted.  
Public MethodDeleteToEndOfCurrentWordDeletes all text from the Start location to the end of the current word. If there is a non-zero length selection, the selected text is deleted.  
Public MethodGrowFontIncreases the font size of the word at the current Start location. If there is an active selection only the font size of the selected text is increased.  
Public MethodIncreaseIndentIncrease the indentation of the paragraph(s) contained in the current selection.  
Public MethodIncreaseListIndentIncrease the indentation of the list that contains the Selection Start. If the Selection Start is not within a list then no action is performed.  
Public MethodIncreaseParagraphOrListIndentIf the selection start is not within the first paragraph of a list, this method does the same thing as the IncreaseIndent method. If the selection start is within the first paragraph of a list, this method does the same thing as the IncreaseListIndent method.  
Public MethodInsertTabInserts a tab character at the Start location. If there a non-zero length selection the current selected text is replaced with a tab.  
Public MethodMoveDownMoves the selection down one line.  
Public MethodMoveToEndOfDocumentMoves the Start location to the end of the RichTextDocument.  
Public MethodMoveToEndOfLineMoves the Start location to the end of the line containing the Start location .  
Public MethodMoveToNextCharacterMoves the Start location to the next character position.  
Public MethodMoveToNextWordMoves the Start location to the next word.  
Public MethodMoveToPreviousCharacterMoves the Start location to the previous character position.  
Public MethodMoveToPreviousWordMoves the Start location to the previous word.  
Public MethodMoveToStartOfDocumentMoves the Start location to the start of the RichTextDocument.  
Public MethodMoveToStartOfLineMoves the Start location to the start of the line containing the Start location .  
Public MethodMoveUpMoves the Start location up one line.  
Public MethodPastePastes the content from the clipboard into the currently selected range of the document.  
Public MethodRemoveBoldFormattingRemoves bold formatting from the text in the current selection.  
Public MethodRemoveDoubleStrikethroughFormattingRemoves double strikethrough formatting from the text in the current selection.  
Public MethodRemoveItalicFormattingRemoves italic formatting from the text in the current selection.  
Public MethodRemoveSingleStrikethroughFormattingRemoves single strikethrough formatting from the text in the current selection.  
Public MethodRemoveStrikethroughFormattingRemoves all strikethrough formatting (single and/or double) from the text in the current selection.  
Public MethodRemoveSubscriptFormattingRemoves superscript formatting from the text in the current selection.  
Public MethodRemoveSuperscriptFormattingRemoves superscript formatting from the text in the current selection.  
Public MethodSelectAllSelects all the content in the RichTextDocument.  
Public MethodSelectCurrentWordSelects the word at the Start offset.  
Public MethodSelectDownMoves the Start location down one line, selecting all text in between the start and end position.  
Public MethodSelectNextCharacterMoves the selection end point one character position to the right.  
Public MethodSelectNextWordMoves the selection end point one word to the right.  
Public MethodSelectPreviousCharacterMoves the selection end point one character position to the left.  
Public MethodSelectPreviousWordMoves the selection end point one word to the left.  
Public MethodSelectToEndOfDocumentExtends the selection to the end of the RichTextDocument.  
Public MethodSelectToEndOfLineExtends the selection to the end of the line containing the End location.  
Public MethodSelectToStartOfDocumentExtends the selection to the start of the RichTextDocument.  
Public MethodSelectToStartOfLineExtends the selection to the start of the line containing the End location.  
Public MethodSelectUpMoves the Start location up one line, selecting all text in between the start and end position.  
Public MethodSetRangeSets the starting and ending character positions for the range.  
Public MethodShrinkFontDecreases the font size of the word at the current Start location. If there is an active selection only the font size of the selected text is increased.  
Public MethodToggleAllCapsFormattingToggles the 'all caps' formatting of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleBoldFormattingToggles the Bold formatting of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleBulletFormattingToggles the bullet list format of the word at the current Start location.  
Public MethodToggleDoubleStrikethroughFormattingToggles the DoubleStrikethrough formatting of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleItalicFormattingToggles the Italic formatting of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleNumberFormattingToggles the number list format of the word at the current Start location.  
Public MethodToggleSingleStrikethroughFormattingToggles the SingleStrikethrough formatting of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleSingleUnderlineFormattingToggles the Underline formatting (between UnderlineType.Single and UnderlineType.None) of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleSmallCapsFormattingToggles the 'small caps' formatting of the word at the current Start location. If there is a non-zero length selection only formatting of the text in the current selection is toggled.  
Public MethodToggleSubscriptFormattingToggles the subscript formatting on the text in the current selection.  
Public MethodToggleSuperscriptFormattingToggles the superscript formatting on the text in the current selection.  
Public MethodToStringGets the string representation of the Selection.  
Public MethodUpdateSelectionWithSpansAllows one or more DocumentSpans to be applied to the selection as an atomic operation.  
Public Events
 NameDescription
Public EventPropertyChangedEvent raised when a property on the object changes.  
See Also