This question is locked. New answers and comments are not allowed.
How can I set the document zoom size programatically? I'm using:
<telerikEditor:RadRichTextBox IsSpellCheckingEnabled="False" Grid.Row="0" x:Name="EditorPrint" IsReadOnly="true" Margin="12" BorderThickness="1" BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="Collapsed" IsContextMenuEnabled="False" />
<telerik:RadRichTextBoxStatusBar Grid.Row="1" AssociatedRichTextBox="{Binding ElementName=Editor, Mode=OneTime}" ScaleFactor="0.75,0.75" />
But it never scales the document to 75%. Always starts at 100% and then I have to manually use the scale option to resize the document. Am I doing something wrong? Can it be done programatically? Do I have to call updatelayout or something?
Thanks.
<telerikEditor:RadRichTextBox IsSpellCheckingEnabled="False" Grid.Row="0" x:Name="EditorPrint" IsReadOnly="true" Margin="12" BorderThickness="1" BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="Collapsed" IsContextMenuEnabled="False" />
<telerik:RadRichTextBoxStatusBar Grid.Row="1" AssociatedRichTextBox="{Binding ElementName=Editor, Mode=OneTime}" ScaleFactor="0.75,0.75" />
But it never scales the document to 75%. Always starts at 100% and then I have to manually use the scale option to resize the document. Am I doing something wrong? Can it be done programatically? Do I have to call updatelayout or something?
Thanks.
6 Answers, 1 is accepted
0
Accepted
Hello Marco,
The way to achieve this is to set the ScaleFactor property of RadRichTextBox:
or in code-behind:
However, there is a bug in RadRichTextBoxStatusBar that causes status bar's combo box to show incorrect value when value of 75% is used (the value is applied to RadRichTextBox properly). It should be fixed in one the following LIBs (Latest Internal Builds). As a temporary workaround you could use any other value different from 75%.
Kind regards,
Boby
the Telerik team
The way to achieve this is to set the ScaleFactor property of RadRichTextBox:
<
telerik:RadRichTextBox
Name
=
"radRichTextBox1"
ScaleFactor
=
"0.7,0.7"
Grid.Row
=
"1"
/>
this
.radRichTextBox1.ScaleFactor =
new
Size(0.75, 0.75);
Don't hesitate to contact us if you have other questions or if this doesn't fit your needs.
Kind regards,
Boby
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Marco
Top achievements
Rank 1
answered on 03 Feb 2011, 11:08 AM
Thank you very much.
0
codeputer
Top achievements
Rank 2
answered on 23 Apr 2011, 06:29 PM
I'm having an issue with RadRichTextBoxStatusBar, please see the attached jpg's.
It's a small issue, but one that the client noticed. It should have enough room, the control is housed within a user control that is then embedded into another User control.
Any ideas?
Regards,
Richard
It's a small issue, but one that the client noticed. It should have enough room, the control is housed within a user control that is then embedded into another User control.
Any ideas?
Regards,
Richard
0
Hi Richard,
Boby
the Telerik team
The problem comes from the Summer theme you are using for your application. One option should be to edit the control's template directly. I am attaching a sample project that demonstrates this approach.
We will fix this issue for the next release. I added some Telerik point to your account in appreciation for your cooperation.
Boby
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
homer
Top achievements
Rank 1
answered on 23 Apr 2012, 07:10 PM
Without knowing the scale factor required to get the document to fit, Is there any way to simply scale the document to the size of the RadRichTextBox ?
If only a portion of the document contains content. Is there a way to only display the part of the document that contaisn the content in the RichTextBox rather then the complete document. What I am trying to do is create a label in the top corner of the document and then display only that part of the document rather then the whole document with only the top corner containing content - but scaled to the size of the textbox that is displaying it.
Also, I am getting a shadowed border around my document in the RadRichTextBox as is displayed in the RichTextEditor. Is there any way to get remove that ? That is fine in the RichTextEditor I would prefer that document margin not be visible when displayed in the RadRichTextBox.
If only a portion of the document contains content. Is there a way to only display the part of the document that contaisn the content in the RichTextBox rather then the complete document. What I am trying to do is create a label in the top corner of the document and then display only that part of the document rather then the whole document with only the top corner containing content - but scaled to the size of the textbox that is displaying it.
Also, I am getting a shadowed border around my document in the RadRichTextBox as is displayed in the RichTextEditor. Is there any way to get remove that ? That is fine in the RichTextEditor I would prefer that document margin not be visible when displayed in the RadRichTextBox.
0
Hello D O'Neill,
You could consider using RadRichTextBox in Flow layout mode, where you won't have margins and borders around the pages, and will be able to fit the content to the box by just using RadRichTextBox.ScaleFactor property. In paged layout mode, you should also use RadRichTextBox.HorizontalOffset and RadRichTextBox.VerticalOffset properties to move the content inside the view port. In this case, you can remove the page border shadow by editing the page template.
Greetings,
Boby
the Telerik team
You could consider using RadRichTextBox in Flow layout mode, where you won't have margins and borders around the pages, and will be able to fit the content to the box by just using RadRichTextBox.ScaleFactor property. In paged layout mode, you should also use RadRichTextBox.HorizontalOffset and RadRichTextBox.VerticalOffset properties to move the content inside the view port. In this case, you can remove the page border shadow by editing the page template.
Greetings,
Boby
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>