Completed
Last Updated: 15 Apr 2019 10:59 by Dimitar
Release R2 2019
Simon
Created on: 02 Apr 2019 11:00
Category: UI for WinForms
Type: Bug Report
1
RadImageEditor: The "Accept" and "Cancel" buttons are not visible when croping
See attached to reproduce.

Workaround:
class MyImageEditor : RadImageEditor
{
    protected override RadImageEditorElement CreateImageEditorElement()
    {
        return new MyImageEditorElement();
    }
}
class MyImageEditorElement : RadImageEditorElement
{
    protected override ImageEditorCanvasElement CreateCanvasElement()
    {
        return new MyCanvasElement(this);
    }
}

class MyCanvasElement : ImageEditorCanvasElement
{
    public MyCanvasElement(RadImageEditorElement owner) : base(owner)
    {

    }
    protected override void PaintElement(IGraphics graphics, float angle, SizeF scale)
    {
        base.PaintElement(graphics, angle, scale);

        if (this.IsCropping)
        {
            Rectangle dynamicCropRect = GetCropRectangle();
            SizeF scaleDown = new SizeF(1f / this.DpiScaleFactor.Width, 1f / this.DpiScaleFactor.Height);

            this.AcceptButton.PositionOffset = TelerikDpiHelper.ScaleSizeF(new SizeF((dynamicCropRect.X + dynamicCropRect.Width / 2f) - this.AcceptButton.Location.X - this.AcceptButton.DesiredSize.Width,
                dynamicCropRect.Y + dynamicCropRect.Height - (this.AcceptButton.DesiredSize.Height + 10)), scaleDown);
            this.CancelButton.PositionOffset = TelerikDpiHelper.ScaleSizeF(new SizeF((dynamicCropRect.X + dynamicCropRect.Width / 2f) - this.CancelButton.Location.X - this.CancelButton.DesiredSize.Width,
                (dynamicCropRect.Y + dynamicCropRect.Height - (this.CancelButton.DesiredSize.Height + 10)) - this.CancelButton.Location.Y), scaleDown);
        }

    }
}
 
1 comment
Dimitar
Posted on: 15 Apr 2019 10:59
Hello, 
 
A Fix will be available in R2 2019.

Regards,
Dimitar