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

Crop behaves weird

3 Answers 15 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 05 Dec 2014, 08:44 PM
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.

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 08 Dec 2014, 12:03 PM
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.

 
0
Alex
Top achievements
Rank 1
answered on 08 Dec 2014, 05:16 PM
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.
0
Todor
Telerik team
answered on 11 Dec 2014, 10:53 AM
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.

 
Tags
ImageEditor
Asked by
Alex
Top achievements
Rank 1
Answers by
Todor
Telerik team
Alex
Top achievements
Rank 1
Share this question
or