Change ScrollBar style for PDFViewWPF

22 views
Skip to first unread message

Tomas Hofmann

unread,
May 20, 2015, 11:48:20 AM5/20/15
to pdfne...@googlegroups.com
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">
<Grid.Resources>
<Style TargetType="ScrollViewer">
<!-- you style -->
 </Style>
</Grid.Resources>
<!-- The PDFViewWPF -->
</Grid>

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
Forward
0 new messages