Unplanned
Last Updated: 15 May 2017 07:12 by Saykor
Saykor
Created on: 15 May 2015 09:02
Category: ImageEditor
Type: Feature Request
4
ImageEditor: Extend CropTool to set InitialPosition of Crop Rectangle
Expose property (e.g. InitialPosition) that will set X and Y start in CropCommandContext from CropTool

To achieve this with the current API this you can get the CropAdorner control from the visual tree and set its CropRect property.

private void imageEditor_Loaded(object sender, RoutedEventArgs e)
{
ImageEditorRoutedCommands.ExecuteTool.Execute(new CropTool(), this.imageEditor);
var cropAdorner = this.imageEditor.FindChildByType<CropAdorner>();
cropAdorner.CropRect = new Rect(10, 10, 100, 100);
}
0 comments