Undo in Custom Tool

2 posts, 0 answers
  1. MNP
    MNP avatar
    40 posts
    Member since:
    Apr 2008

    Posted 12 Aug 2011 Link to this post

    I noticed in your watermark example, any change isn't saved on the undo stack.

    Is there a way on a custom tool you can programmically add to the undo stack?

    Thanks

    -Matt
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 17 Aug 2011 Link to this post

    Hello Matt,

    There are two types of operations that can be performed on an image in the editor - Tools and Commands. You can read more about the difference between the two and how they work here.
    In a nut shell, tools are able to generate a live preview of the effect you are applying on the image with different parameters. When you hit enter, the tool is committed, i.e. a command with the parameters from its SettingsUI is executed and registered in the undo/redo stack. Then, the effect of this command can be reversed and reapplied on undo/redo.
    I hope this helps.

    Best wishes,
    Iva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top