0

For some reason I am not able to use the TextFlow element in WPF. Is this element/control even available?

I am using VS 2008.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
azamsharp
  • 19,710
  • 36
  • 144
  • 222

3 Answers3

2

If you want to avoid the default chrome of the FlowDocument, you can specify the viewer yourself:

<FlowDocumentScrollViewer>
    <FlowDocument>
        <Paragraph>
            <Run>Hello</Run>
            <Run Background="Yellow">World</Run>
        </Paragraph>
    </FlowDocument>
</FlowDocumentScrollViewer>
pn.
  • 852
  • 1
  • 8
  • 9
1

There is no TextFlow element. Were you looking for FlowDocument?

<ContentControl>
    <FlowDocument>
        <Paragraph>
            <Run>Hello</Run>
            <Run Background="Yellow"> World</Run>
        </Paragraph>
    </FlowDocument>
</ContentControl>
pn.
  • 852
  • 1
  • 8
  • 9
  • No I was looking for TextFlow element. I guess the book I am reading is old and was before the release of WPF. – azamsharp Jul 02 '09 at 17:53
  • Here is one link that is using the TextFlow => http://www.longhorncorner.com/UploadFile/mahesh/XamlTextBlock06092005152009PM/XamlTextBlock.aspx?ArticleID=784e187d-9cda-4b07-bc44-b50ab0d19177 – azamsharp Jul 02 '09 at 17:54
0

You can also use a TextBlock:

<TextBlock><Run>Hello</Run><Run Background="Yellow">World</Run></TextBlock>
pn.
  • 852
  • 1
  • 8
  • 9