问题描述:

I would like to create a simple report that consists mainly of text and some charts. The application is like a wizard form, that has user enter information and create a word or similar document report in the end. There will be some charts that will be drawn from the information entered that should be displayed in the report as well.

thanks.

网友答案:

You could use a FlowDocument and inside it you can put an InlineUIContainer with the controls you need:

Example of InlineUIContainer with inside a textbox:

<InlineUIContainer BaselineAlignment="Bottom">
       <TextBox Text="{Binding Comm8RelGest}" />
</InlineUIContainer>

Example of InlineUIContainer with inside a chart:

<InlineUIContainer BaselineAlignment="Bottom">
       <crt:Chart Title="My Chart">
             <crt:ColumnSeries DependentValuePath="Value" IndependentValuePath="Key" ItemsSource="{Binding}" />
       </crt:Chart>
</InlineUIContainer>

Here some documentation about InlineUIContainer inside a FlowDocument: InlineUIContainer

网友答案:

You could use the FlowDocument or FixedDocument classes. They do a lot of work for you, but creating what you describe would still require considerable coding.

相关阅读:
Top