Hi
I have a pop annotation that is on top of another annotation.
I am trying to set the pop annotation behind the other annotation so the other annotation can be selected.
No matter what I do, I cannot get the BringToBackItemUIAction to be enabled.
I have tried to get the BringToFrontItemUIAction and the BringToBackItemUIAction to be enabled, but the IsEnabled property is always false.
It appears that there is some criteria that is not being met.
I assume the following:
The annotation must either have focus or be in the SelectedAnnotationViewCollection.
InteractionMode must be set to edit.
For BringToBackItemUIAction to be enabled, the annotation must be in front.
For BringToFrontItemUIAction to be enabled, the annotation must be in back.
What other criteria is required?
Thanks
Harlan
Unable to get BringToBackItemUIAction UIAction to work
Moderator: Alex
-
- Posts: 84
- Joined: Fri Jan 24, 2020 3:37 am
Re: Unable to get BringToBackItemUIAction UIAction to work
Hi Harlan,
Please send us (to support@vintasoft.com) a small project, which allows to reproduce the problem. We need to reproduce the problem on our side.
Best regards, Alexander
Please send us (to support@vintasoft.com) a small project, which allows to reproduce the problem. We need to reproduce the problem on our side.
Best regards, Alexander
-
- Posts: 84
- Joined: Fri Jan 24, 2020 3:37 am
Re: Unable to get BringToBackItemUIAction UIAction to work
I was able to figure out how to get the Send to back to work, but it is not exactly what I am looking for.
If a pop up is placed over the top of an annotation, and closed, you cannot select the annotation in edit mode, because the popup foot print is still over the annotation. I need to be able to select the annotation when the pop up is closed. We do not want the user to see the outline of a closed pop up and require them to use send to front or send to back.
Here are steps to reproduce on the C# Winform PDFEditorDemo app.
Is there a way we can select that annotation in edit mode without having to deal with the closed popup foot print?
Thanks
Harlan.
If a pop up is placed over the top of an annotation, and closed, you cannot select the annotation in edit mode, because the popup foot print is still over the annotation. I need to be able to select the annotation when the pop up is closed. We do not want the user to see the outline of a closed pop up and require them to use send to front or send to back.
Here are steps to reproduce on the C# Winform PDFEditorDemo app.
- Add a annotation such as a line annotation.
- Add a Reply and place it over the line annotation. Close the Reply.
- In edit mode try to select the annotation.
Is there a way we can select that annotation in edit mode without having to deal with the closed popup foot print?
Thanks
Harlan.
Re: Unable to get BringToBackItemUIAction UIAction to work
Hi Harlan,
You need to override the PdfAnnotationTool.CanInteractWith method if you want to define custom annotation interaction logic.
Here is an example that demonstrates how to disable the interaction with PdfPopupAnnotation in Edit mode:
Best regards, Alexander
You need to override the PdfAnnotationTool.CanInteractWith method if you want to define custom annotation interaction logic.
Here is an example that demonstrates how to disable the interaction with PdfPopupAnnotation in Edit mode:
Code: Select all
public class MyPdfAnnotationTool : PdfAnnotationTool
{
public MyPdfAnnotationTool(PdfJsApp jsApp, bool canUseEditMode)
: base(jsApp, canUseEditMode)
{
}
public override bool CanInteractWith(PdfAnnotationView view)
{
if (InteractionMode == PdfAnnotationInteractionMode.Edit && view.Annotation is PdfPopupAnnotation)
return false;
return base.CanInteractWith(view);
}
}
-
- Posts: 84
- Joined: Fri Jan 24, 2020 3:37 am
Re: Unable to get BringToBackItemUIAction UIAction to work
Hi Alex,
I tried your suggestion, and it partially worked.
After applying the changes I was able to select the annotation with the mouse cursor.
However I am using the annotation tool FindAnnotationView method to select the annotation on a mouse event.
This still returns the Popup annotation view.
I would like to be able to not get the Pop up annotation view with this method.
Thanks
Harlan.
I tried your suggestion, and it partially worked.
After applying the changes I was able to select the annotation with the mouse cursor.
However I am using the annotation tool FindAnnotationView method to select the annotation on a mouse event.
This still returns the Popup annotation view.
I would like to be able to not get the Pop up annotation view with this method.
Thanks
Harlan.
Re: Unable to get BringToBackItemUIAction UIAction to work
Hi Harlan,
Best regards, Alexander
Please override the PdfAnnotationTool.FindInteractiveObject method and implement logic similar to the logic in PdfAnnotationTool.CanInteractWith method.However I am using the annotation tool FindAnnotationView method to select the annotation on a mouse event.
Best regards, Alexander