1
votes

So I have come to that point where I am saying to myself over and over again I am missing some basic stuff. I have a ScrollViewer with a RichTextBlock that converts HTML to the content.

Everything shows up as expected but I can't scroll! I had the VerticalScrollBarVisibility to Hidden but I have taken that out. After seeing this anwsear in StackOverflow I have stoped with the following code:

<ScrollViewer VerticalAlignment="Stretch"
    HorizontalScrollMode="Disabled" 
    VerticalScrollBarVisibility="Visible" 
    VerticalScrollMode="Auto"
    ZoomMode="Disabled" 
    Padding="52" 
    Background="#60000000" >

    <RichTextBlock rtbx:Properties.Html="{Binding TextHTML}"
         TextAlignment="Justify" 
         FontSize="20" />

</ScrollViewer>

It also seems that the PanningMode is not avaiable in Windows 8 but I belive that it is still the expected behaviour to scroll with the touch.

I have tried to put the ManipulationMode to All in the ScrollViewer and also tried to set to none in the RichTextBlock. However, I got no sucess with those approaches.

1
Do you have a screenshot which show what you get?Aymeric
I have text and it shows the scroll on the right. Everything shows as expected. I can scroll using the scroll bar (with a mouse - actually I have some hard time doing that since the RichTextBlock overrides the cursor and I can only select the scroll bar in the right edge) but I can't scroll using the touch.Tiago Almeida
I had some troubles with the scrollviewer and text too. If I remember right I had to put a panel inside the scrollviewer and then the text inside the panelAymeric
I have tried to put a Grid inside and I had no success :(Tiago Almeida
Your XAML looks ok at first glance. Try to remove manipulationmode from RTB and set ishittestvisible to false.Denis

1 Answers

0
votes

Removing the manipulation modes and isolating the problem and simplifing the "options" I was using led me to the conclusion that the ScrollViewer wasn't the issue.

The problem was: I had was a Control that was on top of the ScrollViewer that was hidden (opacity = 0). This Control swallowed all the events that I was needing in the ScrollViewer. Basic mistake.

I had to put the Visibility equals to Collapsed.