Change ScrollBar style for PDFViewWPF

Skip to first unread message

Tomas Hofmann

May 20, 2015, 11:48:20 AM5/20/15
Q: I want to change the style of the ScrollBars in the PDFViewWPF. How can I do this.

A: You can change the appearance of the ScrollBars by changing the implicit ScrollViewer in the containing UI Element. For example:

<Grid x:Name="PDFGrid" Margin="0,0,0,0" UseLayoutRounding="True">
<Style TargetType="ScrollViewer">
<!-- you style -->
<!-- The PDFViewWPF -->

Note that the PDFViewWPF makes assumptions about the width of the vertical ScrollBar when it does calculations.
Starting with 6.5, you can set the PDFViewWPF.VisualScrollBarWidth property to reflect the width of the ScrollBar in your style.

Otherwise, you might want to edit the style a little, to ensure that the style you give the PDFViewWPF has the same width.

Reply all
Reply to author
0 new messages