Custom predefined sizes in crop dialog

4 posts, 0 answers
  1. miksh
    miksh avatar
    275 posts
    Member since:
    Nov 2006

    Posted 28 Apr 2015 Link to this post

    I need to implement a very straightforward (and I believe most common) requirement to limit to a couple the predefined crop sizes in the crop dialog, e.g. 1000x500 and 950x500.

    How can we do it? Based your documentation we must:

    • copy the crop dialog from installation file in separate folder
    • change the dropdown list in the crop dialog
    • configure the ImageEditor control to use external dialogs from that folder
    • use a hack described here to init the crop box to the first predefined size tin the dropdown
    • keep using RenderMode="Classic" as the copied dialog is not rendered properly in Lightweight mode
    • anything missed?

    It seems to be too much for such a simple task, isn't it? Same think to resize dialog.

    I wonder is there a better/simpler way to accomplish this task which would work in any render mode?

    I would really appreciate if the crop/resize dropdown items could be configurable at design time.

    Thanks in advance.

  2. Vessy
    Vessy avatar
    1350 posts

    Posted 30 Apr 2015 Link to this post

    Hello miksh,

    Yes, these are the exact steps you have to go through in order to achieve the described functionality. The only thing you can skip is the custom-stop-settings-hack. As you have already enabled the external dialogs you can simply define the initially selected item of the ComboBox either in its declaration in the markup of the dialog or in its initialize() method.

    As for the Classic render mode - unfortunately this is the only mode in which the ImageEditor dialogs are implemented for the moment.


    See What's Next in App Development. Register for TelerikNEXT.

  3. DevCraft R3 2016 release webinar banner
  4. lee
    lee avatar
    4 posts
    Member since:
    Aug 2015

    Posted 17 Sep 2015 Link to this post

    Do I need another image resizing SDK to help customixe image sizes?
  5. Vessy
    Vessy avatar
    1350 posts

    Posted 17 Sep 2015 Link to this post

    Hi lee,

    RadImageEditor provides both server- and client-side functionality for customizing the size of the edited image and you do not need to use any external SDK in order to achieve it. You can review the API of the control here:
    Server-side API
    Client-side API

    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 Feedback Portal and vote to affect the priority of the items
Back to Top