0

On a windows store app project, im using a PDFtron PDFViewCtrl to display a pdf document. I have a part of the screen where the document is displayed, and it is working well.

I would like to know if there is a way to disable surface pen funcionality on this control, because as it is right now, when i pass over document with the pen, it starts drawing lines.

This is my XAML:

<Grid x:Name="pdfViewer" Background="Transparent" Canvas.ZIndex="111" >
    <Grid.RowDefinitions>
        <RowDefinition Height="*"/>
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>

    <Border x:Name="PDFViewBorder" Background="White" Grid.Row="0"/>
</Grid>

and this is my code behind

MyPDFViewCtrl = new pdftron.PDF.PDFViewCtrl();
PDFViewBorder.Child = MyPDFViewCtrl;
docpdf = new pdftron.PDF.PDFDoc(file);
docpdf.InitSecurityHandler();
MyPDFViewCtrl.SetDoc(docpdf);
krlzlx
  • 5,752
  • 14
  • 47
  • 55
Thought
  • 5,326
  • 7
  • 33
  • 69

1 Answers1

1

In the PDFViewCtrlTools project, in the Pan tool (Pan.cs), in the PointerPressedHandler method, there is a check if the pointer is a pen else if (e.Pointer.PointerDeviceType == PointerDeviceType.Pen) This is what causes the inking to happen. You can edit this to change the behaviour.

Ryan
  • 2,473
  • 1
  • 11
  • 14
  • Ok ill try that, but from what i understand if i edit that, it will affect all my PDFviewctrl, and i just want to disable that feature on a specific one. – Thought Mar 08 '16 at 08:36