Silverlight Rich TextBox
The Rich TextBox exposes several properties for controlling various aspects of the Rich TextBox and its behaviour.
Properties for Liquid.RichTextBox
Below are the available properties complete with descriptions.
DataClipboard (String)
Gets or sets the clipboard data used when copying/pasting.
PainterClipboard (RichTextBoxStyle)
Gets or sets the style used by the style painter.
RichText (String)
Gets or sets the content in its native XML format.
Text (String)
Gets or sets the content as plain text.
SelectionStart (Int32)
Gets the index of the selection start.
SelectionLength (Int32)
Gets the length of the selected content.
SelectionStyle (RichTextBoxStyle)
Gets or sets the style of the selected content.
SelectionListType (Bullet)
Gets or sets the list type of the selected content.
SelectionAlignment (HorizontalAlignment)
Gets or sets the alignment of the selected content.
SelectionBackground (Brush)
Gets or sets the background of the current text selection.
ReadOnly (Boolean)
Gets or sets whether the content is editable.
VerticalScrollBarVisibility (ScrollBarVisibility)
Gets or sets the visibility of the vertical scrollbar.
HorizontalScrollBarVisibility (ScrollBarVisibility)
Gets or sets the visibility of the horizontal scrollbar.
AutoWrap (Boolean)
Gets or sets whether text will wrap automatically with the width of the control or not.
WrapWidth (Double)
Gets or sets the text wrapping width.
UndoHistory (Int32)
Gets or sets the number of operations that can be undone.
ThePast (History)
Gets the undo history.
EnableQuickSelection (Boolean)
Gets or sets whether selection mouse shortcuts such as double-clicking to select a word is enabled.
ErrorWordBrush (Brush)
Gets or sets the brush to use when underlining miss-spelt words.
PopupTitle (String)
Gets or sets the title of the bubble popup for spell checking.
PopupAddButtonText (String)
Gets or sets the Add button text of the bubble popup for spell checking.
PopupReplaceButtonText (String)
Gets or sets the Replace button text of the bubble popup for spell checking.
IsSpellChecking (Boolean)
Gets whether the initial spell checking is in progress.
SpellChecksPerCycle (Int32)
Gets or sets the number of words to check at a time during the initial spell check.
IsRightToLeft (Boolean)
Gets or sets whether text input should slow from right-to-left.
Methods for Liquid.RichTextBox
Below are the available methods, complete with parameters and descriptions.
InsertText(String)
Inserts the string at the cursor.
Parameters
InsertNewline()
Inserts a newline at the cursor position.
Insert(String)
Inserts a block of rich text at the cursor.
Parameters
Returns: Number of content elements created
Delete(Boolean)
Deletes the selected text or the character before or after as indicated by the parameter.
Parameters
deleteForward
True to delete the character infront of the cursor
ApplyFormatting(Formatting, Object)
Applys formatting to the selected content.
Parameters
formatting
Formatting commang
param
Optional formatting parameters
ShowCursor()
Shows the cursor.
HideCursor()
Hides the cursor.
CursorLeft()
Moves the cursor left.
CursorRight()
Moves the cursor right.
CursorUp()
Moves the cursor Up.
CursorDown()
Moves the cursor Down.
Top()
Moves the cursor to the top of the document.
Home()
Moves the cursor to the top of the document.
End()
Moves the cursor to the end of the document.
Bottom()
Moves the cursor to the bottom of the document.
Clear()
Clears all content from the RichTextBox.
Select(Int32, Int32)
Selects the content for the provided range.
Parameters
length
Content length to select
SelectLine()
Selects the content of the current line.
SelectAll()
Selects all the content.
ClearSelection()
Clears the cursor selection.
Cut()
Cuts the selected content and places it on the internal clipboard.
Copy()
Copies the selected content to the internal clipboard.
Paste()
Pastes the content from the internal clipboard to the cursor position.
Painter()
Copies the current style to the clipboard and pastes it to the next selection.
Undo()
Un-does the last operation.
Redo()
Re-does the last operation.
Find(String)
Searches through the text content for the provided terms and moves the cursor to a match.
Parameters
ReturnFocus()
Applies focus to the control.
ShowSuggestions(IEnumerable<String>, Point)
Displays a popup with spelling suggestions.
Parameters
suggestions
String list of suggestions
position
Position within the scrollable area to show
Home(Boolean, Boolean)
Moves the cursor to the top/left of the document.
End(Boolean, Boolean)
Moves the cursor to the end of the document.
Insert(UIElement)
Inserts any UIElement at the cursor position.
Parameters
element
Any element derived from UIElement
OnApplyTemplate()
This is called when the template has been bound to the control.