Set ImageEditor Scroll position

2 posts, 0 answers
  1. Robert
    Robert avatar
    31 posts
    Member since:
    Apr 2011

    Posted 26 Aug 2014 Link to this post

    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?
  2. Todor
    Todor avatar
    168 posts

    Posted 29 Aug 2014 Link to this post

    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.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top