Q: When using PDFNet for Windows Store apps, one thing I’d like to do is hide the page navigation buttons that appear when mousing over the content in any of the non-continuous view layouts.
Alternatively, I’d like to re-style them so that they look like I want them to. How can I do this?
A more permanent solution is to change the implicit style for FlipViews inside the hosting control.
The PDFViewCtrl uses a FlipView in order to handle page flipping in non-continuous modes.
This means that if you edit the Xaml style for FlipView, it will be reflected inside the PDFViewCtrl. You can always create a hosting control in which you put the FlipView and change the implicit style for that control only, if you don’t want to use the same style for all other FlipViews. This lets you either hide the navigation buttons completely, or re-style them.
So, you could do something like this:...
The style for FlipViews can be found here:
This style has 4 navigation buttons defined ( i.e. <Button x:Name=“PreviousButtonHorizontal”). You can put all 4 inside a grid with a collapsed visibility in order to hide them, or edit the content of the Button completely to make it appear differently.
Keep in mind that in order to hide the FlipView buttons when calling PDFViewCtrl.SetScrollingEnabled(false), the PDFViewCtrl must traverse the VisualTree of the internal FlipView, possible causing problems if the Template changes things around too much.
A: When you call PDFViewCtrl.SetScrollingEnabled(false) then those buttons will go away. Of course, scrolling won’t work either, so this only works if you want to freeze the content temporarily.