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

Set ImageEditor Scroll position

1 Answer 73 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 26 Aug 2014, 11:48 PM

When using the RadImageEditor for WPF, I would like to keep the image centered when I programatically set the ScaleFactor property to magnify the image.

I assume that would mean controlling the horizontal and vertical scrollbar positions from code.  

Is there a way to do that?

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 29 Aug 2014, 10:19 AM
Hello Robert,

Indeed there is no out-of-the-box way to do that with the current implementation of the RadImageEditor. However, you can get the ScrollViewer control from the RadImageEditor's template by using the FrameworkTemplate's FindName() method. If you want to read more about that topic, you can check this MSDN article.

For your convenience, I've also created a demo project which illustrates the above described approach. You can find it attached.

Hope this helps.

Regards,
Todor
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ImageEditor
Asked by
Robert
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or