Custom Tool with square selection

2 posts, 0 answers
  1. Luca
    Luca avatar
    1 posts
    Member since:
    Oct 2013

    Posted 12 Oct 2013 Link to this post


    I need to implement a custom tool that is very similar to the crop tool in the user experience. I mean the user has to activate the tool, draw a square across the image, resize and move if necessary and then trigger a custom functionality instead of cropping. 

    Is it possibile to perform it by overriding the crop tool or it needs to create a new ITool from the scratch? How can I implement that two steps process (Selection/adjustment then action) whithin a custom tool? How can I manage to draw the square like in the crop tool?

    Thank you very much for your responses

    My warmest regards

  2. Petya
    Petya avatar
    975 posts

    Posted 16 Oct 2013 Link to this post

    Hello Luca,

    Thank you for contacting us!

    In the particular case I'd suggest you implement your custom tool based on the default Crop tool. Please find attached a sample project demonstrating how a custom tool can be created. The classes in the project contain the default implementation of the CropTool-related classes, but their names are changed. Additionally, the sample is for Silverlight, but the code base of the WPF and Silverlight controls is the same, so you should be able to port the application easily.

    I hope this is helpful! Do not hesitate to get back to us should you have any additional question.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top