I'm trying to automatically select the crop tool when an image is loaded. All is ok if I preload the image, but if I allow the user to select the image, I can't seem to find the event that is called after I load up the image to load the tool.
It's probably right in front of me.
Thanks
-Matt
1 Answer, 1 is accepted
0
Iva Toteva
Telerik team
answered on 15 Aug 2011, 02:49 PM
Hello Matt,
Thank you for this feature suggestion. We will be introducing more convenient events in the upcoming service pack, which will enable you to track when a command is executed, be it the OpenImageCommand or any other.
With the current version of the controls, you can find out when a new image has been loaded in the control by subscribing to the CurrentImageChanged event of the History property in the following way:
Then, you have to check if you can undo/redo, because the CurrentImageChanged is also fired when you commit a command, e.g. you crop the picture or change its size.
Here is a sample code-snippet that determines if a new image has been loaded in the control: