0

我需要将 aComboBox放在空间非常有限的地方。有什么方法可以显示与'sSelectedItemComboBox的项目不同的内容吗?ComboBoxPopup

例如,Firefox 使用浏览器右上角的站点搜索框来执行此操作。When you open the dropdown, the site names are displayed along with their respective logos, but when a site is selected, only the icon is displayed.

4

2 回答 2

1

更新:找到解决方案:-)

我在这个网站上找到了一个解决方案:

http://blogs.windowsclient.net/airborneengineer/archive/2009/06/25/wpf-styles-and-templates-part-ii-combobox-customization.aspx

我只需要修改“DisplayImageWithText”DataTemplate 以仅显示我想要的字段。

于 2009-11-07T08:48:02.180 回答
0

是的,有2组数据并根据位置更改组合框的显示成员列。只要值相同,它就会很好地工作,并且您将从同一个组合框中获得 2 个显示。

于 2009-11-07T06:57:46.427 回答