我有一个列表框,需要至少一个组合框。我找不到在我使用的ItemTemplate中放置ComboBox的方法。Silverlight:如何动态绑定ListBox ItemTemplate中的ComboBox?
...
<DataTemplate x:Key="parts_template">
<StackPanel Orientation="Horizontal">
<TextBlock .../>
<ComboBox .../>
</StackPanel>
</DataTemplate>
...
<ListBox x:Name="lb_parts" ItemTemplate="{StaticResource parts_template}" .../>
...
如何将DataTemplate中的ComoBox绑定到代码后面的ObservableCollection?
你的代码没有通过 - 你能解决它吗? – 2009-09-08 17:53:22
修复了代码。需要添加4个空格缩进。 – James 2009-09-08 18:31:30