This is a migrated thread and some comments may be shown as answers.

change Pagesize in Q1 2012?

1 Answer 30 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
robert asked on 21 Feb 2012, 11:31 AM
Hello i used in Q3 to init the page and default settings following codesnippet.
ChangePageSize is not recognized and also ChangeSectionMargin is now not a member of richtextbox?
How can i set it in code behind like in Q3?
Thanks ...
'Default ---------------------
.FontFamily = New FontFamily("Times New Roman")
.FontSize = Unit.PointToDip(12)
.FontStyle = FontStyles.Normal
.FontWeight = FontWeights.Normal
'Zeilenabstand ---------------
'Seitenränder Normal ---------
.Document.SectionDefaultPageMargin = New Telerik.Windows.Documents.Layout.Padding(96, 96, 96, 96)
.ChangeSectionMargin(New Telerik.Windows.Documents.Layout.Padding(96, 96, 96, 96))
'A4 --------------------------
.ChangePageSize(New SizeF(793, 1056))
'Set -------------------------
.DocumentInheritsDefaultStyleSettings = True

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 24 Feb 2012, 09:20 AM

In Q1 we introduced multiple sections support in the RadRichTextBox. With this change we marked some method of the control as obsolete - they can still be used, but you will not be able to see them in intellisense and Visual Studio will generate a warning (or in some cases error, if you have a stricter code policy) when they are compiled. 
The two methods you named fall in that category. Here is what you can do:
- Instead of ChangeSectionMargin use the ChangeSectionPageMargin methos.
Use the ChangePageSize but give it a Size parameter - not SizeF.

I hope this is helpful.

the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question