I have a FlowDocumentScrollViewer I want to automatically scroll to the bottom when text is added.
<FlowDocumentScrollViewer Name='Scroller'> <FlowDocument Foreground='White' Name='docDebug' FontFamily='Terminal'> <Paragraph Name='paragraphDebug'/> </FlowDocument> </FlowDocumentScrollViewer>
In code I add Inlines to the Paragraph, but when there is to much text I would like to be able to simply scroll down using code instead of having the user doing so.
Any suggestions?
The other answers given here are a bit puzzling, since I don’t see any public ‘ScrollViewer’ property on the FlowDocumentScrollViewer.
I hacked around the problem like this. Beware that this method can return null during initialization: