【发布时间】:2011-05-17 17:45:25
【问题描述】:
我对 FlowDocument 这件事有点陌生,所以我非常愿意接受我做错了什么。话虽如此,我已经编写了一个 FlowDocument,它作为 XAML 文件存在于我的项目中。
就我刚刚开始而言,它非常简单:
<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
ColumnWidth="400" FontSize="14" FontFamily="Georgia">
<Table>
<Table.Columns>
<TableColumn Width="*" />
<TableColumn Width="*" />
<TableColumn Width="*" />
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell>
<BlockUIContainer>
<Image Source="{Binding Logo}" />
</BlockUIContainer>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
现在我想做的是通过我的代码获取对该文档的引用,这样我就可以将绑定设置为模型以设置图像源。有人可以指出如何在后面的代码中实例化和加载 FlowDocument 的方向吗?
【问题讨论】:
标签: c# wpf flowdocument