1

我试过这样的事情:

var attrs = typeof(System.Windows.Controls.ComboBox).GetCustomAttributes(typeof(System.Drawing.ToolboxBitmapAttribute), true);

...但 attrs 是空集合。我还尝试在程序集中查找图标资源,但没有找到。

4

2 回答 2

0

这是因为 ComboBox 类是实际的运行时类,它没有这样的属性。您需要找到设计时类。我已经简要浏览了一些 WPF 程序集,但找不到它。

于 2010-06-18T08:31:41.167 回答
0

我猜 WPF 标准控件的大多数图标都包含在 Visual Studio 图像库中: https ://msdn.microsoft.com/en-us/library/ms246582.aspx

于 2017-03-21T13:04:26.000 回答