Disable surface pen on WinRT pdfviewctrl

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);

Just to clarify im looking to disable the Pen functionality on a specific pdfviewctrl and not on all of them.

segunda-feira, 7 de Março de 2016 às 18:18:22 UTC, Ricardo Silva escreveu:

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);

Each PDFViewCtrl can have an associated ToolManager, which you must be using since you are seeing this behaviour.

The reason it starts drawing can be found inside Pan.cs, in the PointerPressedHandler.
If you find the else if block checking for pen in that function:
else if (e.Pointer.PointerDeviceType == PointerDeviceType.Pen)

You can add your own check. I would recommend adding a boolean property to your ToolManager, and then check in here.
For example
else if (e.Pointer.PointerDeviceType == PointerDeviceType.Pen && mToolManager.PenDraws)