WPFRichTextBox Class

Description

Represents a RichTextBox control.

Inheritance Hierarchy

Syntax

'Declaration
Public Class WPFRichTextBox _
Inherits WPFTextBoxBase

Properties

Name Description
AcceptsReturn a value that indicates how the text editing control responds when the user presses the ENTER key. (Inherited from WPFTextBoxBase)
AcceptsTab a value that indicates how the text editing control responds when the user presses the TAB key. (Inherited from WPFTextBoxBase)
ActualHeight the rendered height of this element. (Inherited from WPFFrameworkElement)
ActualWidth the rendered width of this element. (Inherited from WPFFrameworkElement)
AutoWordSelection a value that determines if a user selects part of a word by dragging across it with the mouse, whether the rest of the word is selected. (Inherited from WPFTextBoxBase)
CanRedo a value that indicates whether the most recent undo action can be redone. (Inherited from WPFTextBoxBase)
CanUndo a value that indicates whether the most recent action can be undone. (Inherited from WPFTextBoxBase)
CaretIndex the insertion position index of the caret.
FontFamily the preferred top-level font family for the TextBlock. (Inherited from WPFControl)
FontSize the top-level font size for the TextBlock. (Inherited from WPFControl)
HorizontalScrollBarVisibility a value that indicates whether a horizontal scroll bar is shown. (Inherited from WPFTextBoxBase)
IsEnabled a value that indicates whether this element is enabled in the user interface (UI). (Inherited from WPFBase)
IsReadOnly a value that indicates whether the text editing control is read-only to a user interacting with the control. (Inherited from WPFTextBoxBase)
IsSpellCheckEnabled whether spell checking is enabled. (Inherited from WPFTextBoxBase)
IsTabStop a value that indicates whether a control is included in tab navigation. (Inherited from WPFControl)
IsUndoEnabled a value that indicates whether undo support is enabled for the text-editing control. (Inherited from WPFTextBoxBase)
Name the identifying name of the element. (Inherited from WPFFrameworkElement)
SelectedText the content of the current selection in the text box. Getting this property returns a string copy of the current. Setting this property replaces the current selection with the specified string.
SelectionLength a value indicating the number of characters in the current selection in the text box.
SelectionStart a character index for the beginning of the current selection.
TabIndex a value that determines the order in which elements receive focus when the user navigates through controls by using the TAB key. (Inherited from WPFControl)
Text The text of the control. (Inherited from TestObject)
ToolTip the tool tip that is displayed for this element in the user interface (UI). (Inherited from WPFBase)
Value The value of the control, e.g.: text in a text control. (Inherited from TestObject)
VerticalScrollBarVisibility a value that indicates whether a vertical scroll bar is shown. (Inherited from WPFTextBoxBase)

Methods

Name Description
AppendText Appends a string to the contents of a text control. (Inherited from WPFTextBoxBase)
BringIntoView Attempts to bring this element into view. (Inherited from WPFBase)
CaptureBitmap Saves a bitmap image of this object to a file. If you do not specify an absolute file name, the bitmap is saved to the default bitmap location on the machine that runs the Agent, which is %LOCALAPPDATA%/Silk/SilkTest/capturedBitmaps. The captured bitmap's pixels are stored in 32bit RGB order; when parsing the image the 4th byte (alpha channel) of every pixel must be ignored as it is used only for padding. In .NET, the constant System.Drawing.Imaging.PixelFormat.Format32bppRgb can be used for this purpose. (Inherited from TestObject)
Clear Clears all the content from the RichTextBox.
Click Clicks on the object. (Inherited from IClickable)
Copy Copies the current selection of the text editing control to the Clipboard. (Inherited from WPFTextBoxBase)
Cut Removes the current selection from the text editing control and copies it to the Clipboard. (Inherited from WPFTextBoxBase)
DoubleClick Double-clicks a mouse button on the object. (Inherited from IClickable)
Exists Checks if any child object matching the locator exists for an object in the application under test. If the timeout parameter is passed the agent retries finding until the given timeout expires. If no timeout is specified and no object is found initially false is returned immediately. (Inherited from TestObject)
Exists Checks if an object exists in the application under test. (Inherited from TestObject)
Find Finds an object specified by an XPath locator. (Inherited from TestObject)
FindAll Finds all objects specified by an XPath locator. (Inherited from TestObject)
GenerateLocator Returns a locator for this object. (Inherited from TestObject)
GetChildren Returns the child objects of this object. (Inherited from TestObject)
GetDynamicMethodList Returns a list of methods (including their signature) that can be dynamically invoked on this TestObject. (Inherited from TestObject)
GetMaximumScrollPosition Retrieves the maximum position of the ScrollViewer. (Inherited from IWPFScrollable)
GetParent Looks up the parent of this object in the test application. (Inherited from TestObject)
GetProperty Returns the value of the specified property. (Inherited from TestObject)
GetPropertyList Returns a list of property names that can be retrieved for the given object. (Inherited from TestObject)
GetRect Returns the size and position of this object. Per default the returned coordinates are relative to the parent window that contains this object. (Inherited from TestObject)
GetScrollPosition Return the position of the ScrollViewer. (Inherited from IWPFScrollable)
HighlightObject Highlights this object. (Inherited from TestObject)
ImageClick Clicks on specified image asset. (Inherited from TestObject)
ImageClickFile Clicks on the specified image. (Inherited from TestObject)
ImageExists Returns whether the specified image asset exists. (Inherited from TestObject)
ImageExistsFile Returns whether the specified image exists. (Inherited from TestObject)
ImageRectangle Returns the object-relative rectangle of the specified image asset. (Inherited from TestObject)
ImageRectangleFile Returns the object-relative rectangle of the specified image. (Inherited from TestObject)
Invoke Dynamically invokes a method on the test object. (Inherited from TestObject)
InvokeMethods Dynamically invokes a sequence of methods starting at this TestObject. (Inherited from TestObject)
IsFocused Return whether the control has focus. (Inherited from IFocusable)
MouseMove Moves the pointer to the specified location in the object. This method is not supported for mobile Web applications. (Inherited from IClickable)
OpenContextMenu Opens a context menu at the specified position. (Inherited from WPFBase)
OpenContextMenuSelect Opens a context menu and selects a menu item from the context menu (Inherited from WPFBase)
Paste Pastes the contents of the Clipboard over the current selection in the text editing control. (Inherited from WPFTextBoxBase)
PointFromScreen Converts a Point in screen coordinates into a Point that represents the current coordinate system of the Visual. (Inherited from WPFFrameworkElement)
PointToScreen Converts a Point that represents the current coordinate system of the Visual into a Point in screen coordinates. (Inherited from WPFFrameworkElement)
PressKeys Presses (but does not release) a set of keys or mouse buttons. (Inherited from IKeyable)
PressMouse Presses (but does not release) a mouse button in the object. This method is not supported for mobile Web applications. (Inherited from IClickable)
Redo Undoes the most recent undo command. In other words, redoes the most recent undo unit on the undo stack. (Inherited from WPFTextBoxBase)
ReleaseKeys Releases a set of keys or mouse buttons. (Inherited from IKeyable)
ReleaseMouse Releases a mouse button. This method is not supported for mobile Web applications. (Inherited from IClickable)
Scroll Sets the value of the ScrollViewer to a specific scrolldestination. (Inherited from IWPFScrollable)
ScrollToPosition Sets the position of the ScrollViewer. (Inherited from IWPFScrollable)
Select Selects a range of text in the text box.
SelectAll Selects the entire contents of the text editing control. (Inherited from WPFTextBoxBase)
SetFocus Gives focus to the control. (Inherited from IFocusable)
SetProperty Sets the value of the specified property. (Inherited from TestObject)
SetText Sets the text.
StartScreenRecording Starts screen recording (Inherited from TestObject)
StopScreenRecording Stops screen recording (Inherited from TestObject)
TextCapture Returns the text in this object's visible area. (Inherited from TestObject)
TextClick Clicks in the center of the specified text. (Inherited from TestObject)
TextExists Returns whether the specified text exists. (Inherited from TestObject)
TextRectangle Returns the object-relative rectangle of the specified text. (Inherited from TestObject)
TypeKeys Sends a set of keystrokes to the object. (Inherited from IKeyable)
TypePasswordKeys Types an encrypted password into an object, for example a text field. (Inherited from IKeyable)
Undo Undoes the most recent undo command. In other words, undoes the most recent undo unit on the undo stack. (Inherited from WPFTextBoxBase)
WaitForChildDisappearance Waits until the specified child object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForDisappearance Waits until the object does not exist or until the timeout is reached. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForObject Waits for an object that matches the specified locator. If no object matches within an timeout an ObjectNotFoundException is thrown. The default timeout is 5 seconds and you can change the timeout by setting the value of the option OPT_WAIT_RESOLVE_OBJDEF. Use WaitForObject if the AUT takes a long time to display a specific object, for example when a transaction is processed before showing any results. By default, an action in the UI does not require a WaitForObject, because of the built-in synchronization. If you receive random timeout errors during normal script execution, consider increasing the default timeout instead of adding WaitForObject statements to your scripts. (Inherited from TestObject)
WaitForProperty Waits until the specified property has the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForPropertyNotEquals Waits until the specified property has a value that is different to the specified value or until the timeout is reached.If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_RESOLVE_OBJDEF will be used. An exception is thrown if the timeout is reached. (Inherited from TestObject)
WaitForScreenshotStable Waits until the control is visually stable and does not change its position, by comparing screenshots taken with the specified interval. If you don't explicitly pass a timeout using the optional timeout parameter, the timeout specified by the option OPT_WAIT_SCREENSHOT_STABLE will be used. The default interval is 200 milliseconds. An exception is thrown if the timeout is reached. (Inherited from TestObject)