4 Answers, 1 is accepted
0
Hello Guy,
There are several approaches to allow zooming in/out in with RadRichTextBox. The most easy way would be to add RadRichTextBoxStatusBar control to your UI, which will provide zooming slider out of the box:
We are using this control in our online demo:
http://demos.telerik.com/silverlight/#RichTextBox/TelerikEditor
Generally to zoom RadRichTextBox view in/out you should change the dependency property ScaleFactor, which takes Size with values from 0 to 1 to zoom out and > 1 to zoom in - (1,1) is the default value meaning no zoom would be applied.
Kind regards,
Mike
the Telerik team
There are several approaches to allow zooming in/out in with RadRichTextBox. The most easy way would be to add RadRichTextBoxStatusBar control to your UI, which will provide zooming slider out of the box:
<
telerik:RadRichTextBoxStatusBar
AssociatedRichTextBox
=
"{Binding ElementName=radRichTextBox1, Mode=OneTime}"
/>
http://demos.telerik.com/silverlight/#RichTextBox/TelerikEditor
Generally to zoom RadRichTextBox view in/out you should change the dependency property ScaleFactor, which takes Size with values from 0 to 1 to zoom out and > 1 to zoom in - (1,1) is the default value meaning no zoom would be applied.
Kind regards,
Mike
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Guy
Top achievements
Rank 1
answered on 21 Dec 2011, 05:07 PM
Hello Boby,
Thank you for your great support. I added successfully the Zoom in/out feature to my richtextbox.
Best regards,
Guy
Thank you for your great support. I added successfully the Zoom in/out feature to my richtextbox.
Best regards,
Guy
0
Rabin
Top achievements
Rank 1
answered on 29 Apr 2013, 07:04 PM
Hello ,
You mentioned there are another ways for zooming in/out for radrichtextbox, Can you please provide me another examples, Do you have seperate commandbindings for it as in the RadPdfViewer.
Like :
<telerik:RadButton Command="{Binding ZoomInCommand}" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsBackgroundVisible="False">
<ToolTipService.ToolTip>
<TextBlock Text="Zoom in" />
</ToolTipService.ToolTip>
<Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-in.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton x:Name="PART_btnZoomOut" Command="{Binding ZoomOutCommand}" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsBackgroundVisible="False">
<ToolTipService.ToolTip>
<TextBlock Text="Zoom out" />
</ToolTipService.ToolTip>
<Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-out.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadComboBox IsEditable="True" Margin="2" MaxWidth="95" SelectedIndex="4" x:Name="cbScale" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
Text="{Binding FixedDocumentViewer.ScaleFactor, Converter={StaticResource doubleToStringPercentConverter}, Mode=TwoWay}">
<telerik:RadComboBoxItem Content="10%" />
<telerik:RadComboBoxItem Content="25%" />
<telerik:RadComboBoxItem Content="50%" />
<telerik:RadComboBoxItem Content="75%" />
<telerik:RadComboBoxItem Content="100%" />
<telerik:RadComboBoxItem Content="150%" />
<telerik:RadComboBoxItem Content="200%" />
<telerik:RadComboBoxItem Content="500%" />
<telerik:RadComboBoxItem Content="1000%" />
</telerik:RadComboBox>
Thanks,
Rabin
You mentioned there are another ways for zooming in/out for radrichtextbox, Can you please provide me another examples, Do you have seperate commandbindings for it as in the RadPdfViewer.
Like :
<telerik:RadButton Command="{Binding ZoomInCommand}" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsBackgroundVisible="False">
<ToolTipService.ToolTip>
<TextBlock Text="Zoom in" />
</ToolTipService.ToolTip>
<Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-in.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadButton x:Name="PART_btnZoomOut" Command="{Binding ZoomOutCommand}" HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="2" Padding="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsBackgroundVisible="False">
<ToolTipService.ToolTip>
<TextBlock Text="Zoom out" />
</ToolTipService.ToolTip>
<Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-out.png" Stretch="None" />
</telerik:RadButton>
<telerik:RadComboBox IsEditable="True" Margin="2" MaxWidth="95" SelectedIndex="4" x:Name="cbScale" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
Text="{Binding FixedDocumentViewer.ScaleFactor, Converter={StaticResource doubleToStringPercentConverter}, Mode=TwoWay}">
<telerik:RadComboBoxItem Content="10%" />
<telerik:RadComboBoxItem Content="25%" />
<telerik:RadComboBoxItem Content="50%" />
<telerik:RadComboBoxItem Content="75%" />
<telerik:RadComboBoxItem Content="100%" />
<telerik:RadComboBoxItem Content="150%" />
<telerik:RadComboBoxItem Content="200%" />
<telerik:RadComboBoxItem Content="500%" />
<telerik:RadComboBoxItem Content="1000%" />
</telerik:RadComboBox>
Thanks,
Rabin
0
Hello Rabin,
Thank you for writing.
You can use the ScrollToVerticalOffset and ScrollToHorizontalOffset methods of RadRichTextBox to scroll to appropriate offset.
I hope this helps.
Regards,
Mihail
the Telerik team
Thank you for writing.
You can use the ScrollToVerticalOffset and ScrollToHorizontalOffset methods of RadRichTextBox to scroll to appropriate offset.
I hope this helps.
Regards,
Mihail
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.