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

RadImageEditorUI set custom width and height for resize tol

2 Answers 20 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Mesut
Top achievements
Rank 1
Mesut asked on 12 Sep 2018, 11:36 AM

Hi,

I need to implement a custom resize tool  in RadImageEditorUI and set default width and hight. Is it possible to override resize tool? 

Thank you very much for your responses

My warmest regards

Mesut

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 13 Sep 2018, 08:51 AM
Hello Mesut,

Here is a custom tool that you can use:
public class CustomResizeTool : ResizeTool
{
    private const int DefaultWidth = 400;
    private const int DefaultHeight = 400;
    private ResizeToolSettings resizeToolSettings;
 
    public override UIElement GetSettingsUI()
    {
        this.resizeToolSettings = (ResizeToolSettings)base.GetSettingsUI();
        return this.resizeToolSettings;
    }
 
    public override void ResetSettings()
    {
        base.ResetSettings();
        this.resizeToolSettings.SetImageSize(DefaultWidth, DefaultHeight);
    }
}
I've also attached a small example showing this. I hope it helps.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Mesut
Top achievements
Rank 1
answered on 13 Sep 2018, 09:01 AM

Hi Martin,

Thank you very much for the help!

Tags
ImageEditor
Asked by
Mesut
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Mesut
Top achievements
Rank 1
Share this question
or