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.
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.
There is no TextFlow element. Were you looking for FlowDocument?
<ContentControl>
<FlowDocument>
<Paragraph>
<Run>Hello</Run>
<Run Background="Yellow"> World</Run>
</Paragraph>
</FlowDocument>
</ContentControl>
You can also use a TextBlock:
<TextBlock><Run>Hello</Run><Run Background="Yellow">World</Run></TextBlock>
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>