Hi,
I need to show some formatted pages on a Book. My customer have seen the Book component and he says: "Wonderful", so now I've to do it.
I've starder creating an Editor (of course my customer wanto to edit/modify the pages) using the RichTextBox wich load and save the pages on the customers database.
One day is gone, but the result is fine.
Now I've to create the Book on a page with dynamic width and hight, so I created a UserControl with a RichTextBox inside, without setting the Height and Width, but setting the Margin.
And now???
I've tryied to change the dimension of the page dynamically with the following method when the RichTextBox is loaded:
But, I don't know how to change the left and top margin of the page. Where are the left, top, bottom and right property of the RichTextBox Page?
Thanks a lot and Regards.
Andrea Ferrari
I need to show some formatted pages on a Book. My customer have seen the Book component and he says: "Wonderful", so now I've to do it.
I've starder creating an Editor (of course my customer wanto to edit/modify the pages) using the RichTextBox wich load and save the pages on the customers database.
One day is gone, but the result is fine.
Now I've to create the Book on a page with dynamic width and hight, so I created a UserControl with a RichTextBox inside, without setting the Height and Width, but setting the Margin.
And now???
I've tryied to change the dimension of the page dynamically with the following method when the RichTextBox is loaded:
private void editor_Loaded(object sender, RoutedEventArgs e) |
{ |
RadRichTextBox tb = sender as RadRichTextBox; |
tb.Document.PageLayoutSettings.Height = controlSize.Height - defaultMargin.Top - defaultMargin.Bottom; |
tb.Document.PageLayoutSettings.Width = controlSize.Width - defaultMargin.Left - defaultMargin.Right; ; |
tb.UpdateEditorLayout(); |
} |
Thanks a lot and Regards.
Andrea Ferrari