![]() IsCheckedProperty, binding ) Keyboard shortcuts to perform selection Binding binding = new Binding () //Binds the IsChecked property to property of RichTextBoxAdv. Initializes the new binding for toggle text alignment property as left. The following sample code demonstrates how to apply subscript format for the selected content. Selection Format-page size and page margin. Paragraph Format-before and after spacing, first line, left and right indenting, text justification, line spacing, and multilevel list. The SfRichTextBoxAdv supports the following format properties that can be applied for selection contents.Ĭharacter Format-bold, italic, font size, font family, font color, highlight color, underline, strikethrough, subscript, and superscript. Add ( startPosition2, endPosition2 ) Apply Formatting for selection Add ( startPosition1, endPosition1 ) richTextBoxAdv. GetTextPosition ( "0 2 20" ) // Selects the first paragraph and third paragraph at a time, leaving second paragraph. TextPosition endPosition2 = richTextBoxAdv. GetTextPosition ( "0 2 0" ) // Retrieves the position of the third paragraph at offset=20. TextPosition startPosition2 = richTextBoxAdv. ![]() GetTextPosition ( "0 0 20" ) // Retrieves the position of the third paragraph start. TextPosition endPosition1 = richTextBoxAdv. GetTextPosition ( "0 0 0" ) // Retrieves the position of the first paragraph at offset=20. TextPosition startPosition1 = richTextBoxAdv. Retrieves the position of the first paragraph start. The following sample code demonstrates how to move selection start and selection end both at a specific text position. GetTextPosition ( "0 0 24" ) /* Here text position returned should be first section's first block (which is paragraph) and offset=24. */ // Gets the text position from the document based on hierarchical index. paragraph-index offset-in-paragraph C block-index offset-in-paragraph For example "0 3 16 C 2 6", gets text position of Paragraph at third block of comment (present at offset = 16 in paragraph at third block of first section) at the offset=6. ![]() ![]() ![]() Then the process of retrieving paragraph from block index continues. If offset value is followed by "C" which stands for comment, then the comment is retrieved which is followed by block index in comment. "table-index row-index cell-index block-index " For example "0 2 1 1 0 21" gets text position of Paragraph at first block of second cell of second row of table (at third block of first section) at the offset=21. The value after cell is again a block index. If block in the index is table, then next value is considered as row index and following value as cell index. For example "0 0 1" gets text position of Paragraph (first block of first section) at the offset=1. * The hierarchical index should be given as "section-index block-index offset-in-paragraph" If block in the index is paragraph, then next value is considered as offset and position is retrieved. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |