Mouse cursor while using stamp tool

Hello,

When using the Stamp tool, the mouse cursor changes to the stamp that is about to be placed:


How can I do the same trick with a cursor that I want to define myself?

Thanks!


6 Replies 1 reply marked as answer

DD Divya Dhayalan Syncfusion Team December 16, 2021 02:36 PM UTC

Hi Wouter, 
 
Based on the details you have provided; we understand that your requirement is to place custom cursor like the stamp cursor effect on above the PdfViewerControl. Please confirm us whether your requirement is same or kindly share some more details about your requirement which will be helpful for us to analyze better on this and provide you a better solution. 
 
Regards, 
Divya  



WV Wouter van der Post replied to Divya Dhayalan December 16, 2021 02:58 PM UTC

Hello Divya,


That is correct. I want to have a custom mouse cursor when my custom tool is selected. Ideally I would like to define the cursor in code so that it can have different sizes/content (instead of a fixed image).



DD Divya Dhayalan Syncfusion Team December 20, 2021 07:28 PM UTC

Hi Wouter,   
 
Thank you for the confirmation.  
  
Based on the provided details, we are currently checking on this and we will update further details on 21st December 2021.   
 
Regards,  
Divya 



DD Divya Dhayalan Syncfusion Team December 21, 2021 03:48 PM UTC

Hi Wouter,     
 
Internally, we have handled cursor appearance by using an image control (for stamp appearance) over the canvas similar to the one shown in the following link. 
 
To achieve this, we may to use a canvas above the PDF Viewer and handle the cursor there.  
  
We have created sample for your reference, and which can be downloaded from the below link. 
 
Steps to show custom cursor over PdfViewerControl.  
1.       Download and extract the above sample.   
2.       Open and run the sample.   
3.       Ensure the “Add cursor over PDF” checkbox state to checked.   
4.       Application will show the custom cursor when hovering above PdfViewerControl. 

In this sample, we used a canvas (LayerOverPDF) to show popup control as a custom cursor. When the “Add cursor over PDF” checkbox is checked, the canvas (LayerOverPDF) will be visible if unchecked the canvas (LayerOverPDF) is set to collapsed. The popup will be showed when we mousemove over the PdfViewerControl, by setting position and size for the canvas in the PdfViewer PageMouseMove event handler. 

Note: Since it will be handling over external Canvas, the interaction with PDF Viewer might be affected 
  
Please let us know if you need any further assistance on this. 
 
Regards,  
Divya 


Marked as answer

WV Wouter van der Post January 10, 2022 10:06 AM UTC

I've managed to use your sample project and with some modifications it suits the requirement.

Thanks!



RB Rajavignesh BalaSankar Syncfusion Team January 11, 2022 07:09 AM UTC

Hi Wouter,


Most welcome, we are glad that the provided solution helpful to achieve your requirement. Please let us know if you need any further assistance on this.


Regards,

Raja Vignesh.


Loader.
Up arrow icon