2011-03-31 113 views

回答

1

你不应该使用的DisplayMemberPath,而是使用一个DataTemplate和TemplateColumn中

<ComboBox> 
     <ComboBox.ItemTemplate> 
      <DataTemplate> 
       <StackPanel Orientation="Horizontal"> 
        <TextBlock Text="{Binding First}" Margin="0,0,10,0" /> 
        <TextBlock Text="{Binding Second}"/> 
       </StackPanel> 
      </DataTemplate> 
     </ComboBox.ItemTemplate> 
    </ComboBox>