Following are the feature of rich text box control
-
Rich content - multimedia
-
Inline images
-
Formatted text
-
Hyperlinks
Rich text box offer two modes
-
Editing mode which is by default.
-
Read only mode which can be set by using IsReadOnly="True"
Note: The hyperlinks will work only if IsReadOnly property is set to
true.
Main Page
Following image shows how the page looks with rich text box.
To set the content of RichTextBox control you can use Paragraph element as shown
below
Hyperlink
To show the hyperlink you can use the Hyperlink element. The hyperlink will
navigate only if the rich text box is in read only mode i.e. isReadOnly=True
UIElement
To show the text with the inline UIElement object like image as shown below
Left Alignment
To change the alignment to left or start typing from left, then select the text
and click on the left button. As shown below
For this use the following code:
Center Alignment
To change the alignment to center or start typing from center, then select the
text and click on the center button. As shown below.
For this use the following code:
Right Alignment
To change the alignment to right or start typing from right, then select the
text and click on the right button. As shown below.
For this use the following code:
Bold
To make the text bold, then first select the text and click on the bold button.
As shown below:
For this use the following code:
Italic
To make the text italic, then first select the text and click on the italic
button. As shown below:
For this use the following code:
Underline
To make the text underline, then first select the text and click on the
underline button. As shown below:
For this use the following code:
Wrap / Unwrap
To wrap the content, then check wrap checkbox. As shown below:
To remove wrap, then uncheck wrap checkbox. As shown below:
For this use the following code:
Load image
To load multimedia content like image, specify the location of the image and
then click load button. As shown below.
For this use the following code: