Karl_Schuhmann
Karl_Schuhmann

Reputation: 1332

Text Wrapping in WPF FlowDocumentScrollViewer/RichTextBox

How can I prevent the text wrapping in a FlowDocumentScrollViewer or in a RichTextBox? A Textblock do not work:

<TextBlock TextWrapping="NoWrap" Margin="203,12,12,6" Grid.RowSpan="4">
    <FlowDocumentScrollViewer Name="rTB" />
</TextBlock>

I load a FlowDocument in the FlowDocumentScrollViewer with formated text. I save and load the FlowDocument in a Database(binary). There is an example in AvalonEdit, but i dont understand it. It's to complex for me. I dont use MVVM.

Upvotes: 1

Views: 1591

Answers (1)

ahawkthomas
ahawkthomas

Reputation: 666

I think you can try the solution described here, although there is a little problem in it (the horizontal scroolbar in RichTextBox will be visible all time).

Upvotes: 1

Related Questions