Search code examples
wpfflowdocument

Is TextFlow Element Valid in WPF


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.


Solution

  • 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>