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
Annotation viewer crop WPF
Moderator: Alex
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Annotation viewer crop WPF
Hi,
If you want to know when WpfCropSelectionTool visual tool executed WpfCropSelectionTool.Crop method, you need to do the following steps:
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.
-
- Posts: 6
- Joined: Wed Mar 22, 2023 4:09 pm
Re: Annotation viewer crop WPF
Thanks will try that.
-
- Posts: 6
- Joined: Wed Mar 22, 2023 4:09 pm
Re: Annotation viewer crop WPF
Thanks that work great.