I am not sure what is the exact approach you used to create a custom tool, but this is a fairly easy task and there is an example that might be helpful in our SDK
. Creating a custom command in particular is as simple as deriving from IImageCommand
Regarding your other concerns:
- RadImageEditor has a CommitTool () method which can be invoked with executeSameToolAfterCommit parameter set to false. This will apply the current tool and hide the tool settings (if such). So, basically, if there is an Apply button in your application, you can call this line in it:
and it will behave exactly as you want it to.
- When executing a tool the ExecuteToolCommand is executed with a CommandParameter the respective tool. If you download the example I previously referenced and add the following in its CommandExecuted event handler, you can verify it is raised when the tool is invoked through the command.
sender, Telerik.Windows.Media.Imaging.ImageEditorCommands.ImageCommandExecutedEventArgs e)
ExecuteToolCommand && e.CommandParameter
//watermark command is executed
As for how to determine that the image has been changed, the easiest way to do that is by subscribing to the CurrentImageChanged event like this:
.imageEditor.ImageEditor.History.CurrentImageChanged += History_CurrentImageChanged;
I hope the provided information helps! Let us know if you have other questions or comments.