【发布时间】:2010-12-14 10:46:26
【问题描述】:
我有点 WPF/XAML 新手,所以这可能是一个非常明显的问题。
我在 FlowDocument 类型的项目中添加了一个新项目。我们就叫它CrappyFlowDocument.xaml:
<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
ColumnWidth="400" FontSize="14" FontFamily="Georgia">
<Paragraph>
Woo, my first paragraph!
</Paragraph>
</FlowDocument>
我将它放在一个单独的文件中,因为我想避免将大块文本放在我的 PrettyInfoWindow 中间。
现在,在我的PrettyInfoWindow 中,我被难住了。
<FlowDocumentScrollViewer x:Name="flowDocViewer" Margin="0,0,0,0" Background="#FF414141" Zoom="80" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" IsSelectionEnabled="False">
<!-- What do I put here-abouts to get my CrappyFlowDocument.xaml to show? -->
</FlowDocumentScrollViewer>
我在网上找不到任何关于这种“包含”功能的信息,但可能我的搜索结果很糟糕。如果这不是 FlowDocument.xaml 文件的预期用途,那是什么?
【问题讨论】:
标签: c# wpf data-binding flowdocument flowdocumentscrollviewer