Annotation viewer crop WPF

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
deedubya
Posts: 6
Joined: Wed Mar 22, 2023 4:09 pm

Annotation viewer crop WPF

Post by deedubya »

Hi,

I am using latest version of Annotation viewer in WPF. I have tools for annotations and crop and can detect when the annotation ends but cannot seen to find the event which relates to the completion of the crop (WpfCropSelectionTool) as I would like to automatically turn off this tool once it has been exectued.

Thanks
Alex
Site Admin
Posts: 2306
Joined: Thu Jul 10, 2008 2:21 pm

Re: Annotation viewer crop WPF

Post by Alex »

Hi,

If you want to know when WpfCropSelectionTool visual tool executed WpfCropSelectionTool.Crop method, you need to do the following steps:
  • Create MyWpfCropSelectionTool class, which is derived from WpfCropSelectionTool class, and override WpfCropSelectionTool.Crop method:

    Code: Select all

    public class MyCropTool : WpfCropSelectionTool
    {
        public override void Crop()
        {
            base.Crop();
    
            ImageViewer.VisualTool = null;
        }
    }
  • Use MyWpfCropSelectionTool class in image viewer.
Best regards, Alexander
deedubya
Posts: 6
Joined: Wed Mar 22, 2023 4:09 pm

Re: Annotation viewer crop WPF

Post by deedubya »

Thanks will try that.
deedubya
Posts: 6
Joined: Wed Mar 22, 2023 4:09 pm

Re: Annotation viewer crop WPF

Post by deedubya »

Thanks that work great.
Post Reply