RichTextBoxExtensions Class

Contains custom extension methods to use with RichTextBox control.

Definition

Namespace: DevCase.Extensions.RichTextBoxExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[HideModuleNameAttribute]
public sealed class RichTextBoxExtensions
Inheritance
Object    RichTextBoxExtensions

Methods

AppendColoredText(RichTextBox, String, Color, Boolean) Appends colored text to the current text of the RichTextBox.
AppendColoredText(RichTextBox, String, Color, Color, Boolean) Appends colored text to the current text of the RichTextBox.
AppendColoredText(RichTextBox, String, Color, Color, Font, Boolean) Appends colored text to the current text of the RichTextBox.
AppendText Appends the specified text to the current text of the RichTextBox.
AppendTextAndSelect Appends the specified text to the current text of the RichTextBox and selects it.
ClearSelectedText Clears the selected text in the RichTextBox.
ColorizeMatches(RichTextBox, Regex, Color) Matches all the occurrences of the specified regular expression in the source RichTextBox and set the foreground color of any occurrence found.
ColorizeMatches(RichTextBox, Regex, Color) Matches all the occurrences of any of the specified regular expressions in the source RichTextBox and set the foreground color of any occurrence found.
ColorizeMatches(RichTextBox, String, Boolean, Color) Matches all the occurrences of the specified string in the source RichTextBox and set the foreground color of any occurrence found.
ColorizeMatches(RichTextBox, String, Boolean, Color) Matches all the occurrences of the specified strings in the source RichTextBox and set the foreground color of any occurrence found.
ColorizeMatches(RichTextBox, Regex, Color, Color) Matches all the occurrences of the specified regular expression in the source RichTextBox and set the foreground and background colors of any occurrence found.
ColorizeMatches(RichTextBox, Regex, Color, Color) Matches all the occurrences of any of the specified regular expressions in the source RichTextBox and set the foreground and background colors of any occurrence found.
ColorizeMatches(RichTextBox, String, Boolean, Color, Color) Matches all the occurrences of the specified string in the source RichTextBox and set the foreground and background colors of any occurrence found.
ColorizeMatches(RichTextBox, String, Boolean, Color, Color) Matches all the occurrences of the specified strings in the source RichTextBox and set the foreground and background colors of any occurrence found.
ColorizeMatches(RichTextBox, Regex, Color, Color, Font) Matches all the occurrences of the specified regular expression in the source RichTextBox and set the foreground color, background color, and the font of any occurrence found.
ColorizeMatches(RichTextBox, Regex, Color, Color, Font) Matches all the occurrences of any of the specified regular expressions in the source RichTextBox and set the foreground color, background color, and the font of any occurrence found.
ColorizeMatches(RichTextBox, String, Boolean, Color, Color, Font) Matches all the occurrences of the specified string in the source RichTextBox and set the foreground color, background color, and the font of any occurrence found.
ColorizeMatches(RichTextBox, String, Boolean, Color, Color, Font) Matches all the occurrences of the specified strings in the source RichTextBox and set the foreground color, background color, and the font of any occurrence found.
CopyAll Copies all the text contained in the RichTextBox to the clipboard.
Deserialize Deserializes the text of the RichTextBox from a binary local file.

You can use this method to restore the text of a RichTextBox that was saved using the Serialize(RichTextBox, FileInfo, SerializationFormat) method.

Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
FindNext(RichTextBox, String, RichTextBoxFinds) Finds the next occurrence of the specified string in the RichTextBox and selects it.
FindNext(RichTextBox, String, RichTextBoxFinds, Color, Color) Finds the next occurrence of the specified string in the RichTextBox and selects it.
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetType Gets the Type of the current instance.
(Inherited from Object)
IterateMatches(RichTextBox, Regex, ActionRichTextBox, Match) Matches all the occurrences of the specified regular expression in the source RichTextBox and invokes the specified action for any occurrence found.
IterateMatches(RichTextBox, Regex, ActionRichTextBox, Match) Matches all the occurrences of the specified regular expressions in the source RichTextBox and invokes the specified action for any occurrence found.
ScrollToBottom Scrolls the source RichTextBox to bottom.
ScrollToTop Scrolls the source RichTextBox to top.
Serialize Serializes the text of the RichTextBox to a binary local file.

You can use this method to backup the text of a RichTextBox, then restore it with the Deserialize(RichTextBox, FileInfo, SerializationFormat) method.

SetCaretPos Sets the text-cursor position in the RichTextBox.
SetCaretPosToBegin Moves the text-cursor to the first character position in the RichTextBox.
SetCaretPosToEnd Moves the text-cursor to the last character position in the RichTextBox.
ToString Returns a string that represents the current object.
(Inherited from Object)

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)

See Also