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

RadImageEditor disable scrolls when printing

1 Answer 158 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Tural
Top achievements
Rank 1
Tural asked on 29 Mar 2018, 09:55 AM

Hi,How to disable scrolls when printing RadImageEditor component? I try some properties like ScrollViewer.VerticalScrollBarVisibility,ScrollViewer.HorizonalScrollBarVisibility but no one works.(hidden and disable values of these properties)

 

 <imaging:ZoomController  x:Name="zoomController" Grid.Row="0" Grid.Column="1" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.PanningMode="Both" ImageEditor="{Binding ElementName=imageEditor}"  Margin="0.8"/>

....

 <telerik:RadImageEditor   IsPanningEnabled="True"  Margin="0,0,0,0"  x:Name="imageEditor" ScaleFactor="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

 

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 02 Apr 2018, 01:08 PM
Hello Tural,

Thank you for the attached picture. 

In order to hide the vertical and horizontal scrollbars, you can use the ChildrenOfType extension method on the RadImageEditor. That approach would look something like this:
var scrollbars = ImageEditor.ChildrenOfType<ScrollBar>();

Please note that in the above snippet "ImageEditor" refers to the instance of RadImageEditor. After you get the vertical and horizontal scrollbars, you can set their Visibility to Collapsed before exporting and return their Visibility to Visible after that.

In order to get the RadImageEditor instance from the RadImageEditorUI, you can also use the ChildrenOfType extension method:
var scrollbars = ImageEditorUI.ChildrenOfType<RadImageEditor>().First().ChildrenOfType<ScrollBar>();

Hope this helps. 

Regards,
Vladimir Stoyanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ImageEditor
Asked by
Tural
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or