I'm trying to add an horizontal line programtically to a RichTextBox with no success. I've tried to add an InlinieUIContainer with a path and a line as UIElement to a paragraph with no result. Can anyone help me?
Thanks.
1 Answer, 1 is accepted
0
Iva Toteva
Telerik team
answered on 03 Jan 2011, 09:33 AM
Hello DanĂ,
InlineUIContainers are not shown, unless you set their Height and Width explicitly. If you want to avoid the necessity of calculating the height and width of the line you are about to insert, you can simply insert a table like we advised you in the support ticket you opened:
//You need to measure and arrange the document after manipulating its structure through the Blocks, Inlines, Children, etc properties if you want to use the format providers directly. If you are showing the document in a RadRichTextBox, you should call the UpdateEditorLayout() method on it.
This will work in both Flow and Paged layout mode, on resize of the window and other cases where fixed Height and Width might be a setback.
Note that we have introduced support for borders of different colors after Q3 and you should upgrade to the version in the latest internal builds in order to use them.
If you have other questions, do not hesitate to contact us again.
Greetings,
Iva
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight