Crop behaves weird

4 posts, 0 answers
  1. Alex
    Alex avatar
    54 posts
    Member since:
    Feb 2009

    Posted 05 Dec 2014 Link to this post

    I have vanilla ImageEditor inside a Child Window. No other customization.
    When i open a picture, and click on the Crop button, the image view changes and does not occupy full window anymore.
    Attache are screenshots before and after clicking the Crop button.
  2. Todor
    Admin
    Todor avatar
    168 posts

    Posted 08 Dec 2014 Link to this post

    Hello Alex,

    This is caused because 100% zoom is set to the RadImageEditor. If you desire to fit the image in RadImageEditor's viewport, you should set the ScaleFactor property to 0. In this way image' scaling is set to 'AutoFit'.

    If this is not the case and you desire to hide the settings container at right, you can attach to the RadImageEditor's CommandExecuted event and to hide the container in the event handler when a CropTool is selected:
    private void ImageEditor_CommandExecuted(object sender, ImageCommandExecutedEventArgs e)
    {
        if (e.CommandParameter is CropTool)
        {
            this.ImageEditorUI.ImageEditor.ToolSettingsContainer.Hide();
        }
    }

    I hope this helps.


    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Alex
    Alex avatar
    54 posts
    Member since:
    Feb 2009

    Posted 08 Dec 2014 in reply to Todor Link to this post

    Hi Todor,
    I think you did not understand my problem. The issue is not with AutoFit nor with the settings container.
    Please compare the before and after pictures carefully.
    Before, the ImageEditor viewport extend to the right all the way to the edge of the window.
    Once I click on the Crop button, the ImageEditor viewport right edge moves to the left and doe not extend all the way to the edge any more.
    I have implemented the ScaleFactor property 0 and that works fine, thanks for the advice it is usefull, but the problem with the Crop button and viewport change remains.
  5. Todor
    Admin
    Todor avatar
    168 posts

    Posted 11 Dec 2014 Link to this post

    Hi Alex,

    Please accept my apologies if I misunderstood you correctly.
    The settings container which I've mentioned in my previous answer is surrounded with red rectangle in the attached image. This container is shown when the crop tool is loaded and this is why the RadImageEditor shrinks a bit. You can hide it by using the approach I've suggested.

    If this is not the case, can you specify a bit more what is the exact difference between the two pictures?


    Regards,
    Todor
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top