【发布时间】:2012-03-14 18:59:25
【问题描述】:
ItemsSource (SsString) 是一个 SortedSet 字符串
我想在 ListBox 中使用 TextBox(不是默认的 TextBlock),但我不知道如何绑定到 SortSet 中的值。
我尝试过没有路径、Key、key、Value 和 value 的绑定。
<ListBox ItemsSource="{Binding Path=SsString}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=Key}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
以下工作,但它显示 TextBlock。
<ListBox ItemsSource="{Binding Path=SsString}" />
【问题讨论】:
标签: wpf xaml data-binding textbox listbox