1
标记为XAML的键和值:数据绑定字典收集到RichTexbox呈现出集合
<RichTextBox HorizontalAlignment="Left" Height="120" Margin="359,554,0,0" VerticalAlignment="Top" Width="306" Name="duplicateCompXMLVarRichTextBox">
<FlowDocument>
<Paragraph>
<ItemsControl ItemsSource="{Binding Value}"/>
<!-- <ItemsControl ItemsSource="{Binding Key}"/> -->
</Paragraph>
</FlowDocument>
</RichTextBox>
代码隐藏:
Dictionary<string, List<string>> componentXMLDuplicates = new Dictionary<string, List<string>>();
componentXMLDuplicates= Helper.PopulateCollectionWithData();
duplicateCompXMLVarRichTextBox.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
duplicateCompXMLVarRichTextBox.DataContext = componentXMLDuplicates;
这里的问题是,我只能说明无论是按键还是一个价值观字典集合在WPF窗口中。是否有可能在两者之间使用适当的格式或空格同时显示?有什么建议么?
超人! @nit非常感谢:)。一旦stackoverflow允许我将此标记为批准。 – Sike12