Ruben
Ruben

Reputation: 55

Problem with showing flowdocument in wpf MVVM

i have a textbox, and i have this xaml in it :

<FlowDocument xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph>Welk alternatief gebruik is er met een EN poort mogelijk ? <LineBreak />Flexibele inverter<LineBreak />Doorlaatfilter<LineBreak />Samensteller<LineBreak />Opteller<LineBreak /></Paragraph></FlowDocument>

now my question is simple, how do i show this nicely in a flowdocument, so how do i show this in my view, without all this xaml stuff (tags) in it.

Upvotes: 0

Views: 828

Answers (1)

Gimno
Gimno

Reputation: 6596

If I understand your question correctly, all you have to do is put it in a RichTextBox:

<RichTextBox>
  <FlowDocument xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph>Welk alternatief gebruik is er met een EN poort mogelijk ? <LineBreak />Flexibele inverter<LineBreak />Doorlaatfilter<LineBreak />Samensteller<LineBreak />Opteller<LineBreak /></Paragraph></FlowDocument>
</RichTextBox> 

Upvotes: 1

Related Questions