【发布时间】:2012-03-21 04:18:23
【问题描述】:
我想要两个带有空元素集合的组合框。
我使用两个组合框:
<ComboBox x:Name="itemEditPageComboBox"
...
ItemsSource="{StaticResource ItemsColl}"
....
/>
Collections:
<CompositeCollection x:Key="ItemsColl">
<ComboBoxItem Content="" />
<CollectionContainer Collection="{Binding Source={StaticResource ElementsCollection}}" />
</CompositeCollection>
<CollectionViewSource x:Key="ElementsCollection" Source="{Binding Path=...}" />
行为
依次选择两个组合框,之后 - 其中一个被删除空元素。
错误:
System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='ComboBoxItem'
请告诉我该怎么做?
最好的问候!
【问题讨论】:
标签: wpf xaml data-binding combobox