我怎么能转换为的BitmapImage图标? [英] How can I convert BitmapImage to Icon?
本文介绍了我怎么能转换为的BitmapImage图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序必须发送一个列表与LT;菜单项>
在WCF我的外壳扩展。这些的MenuItems是由一个图标和一个标签。该类型的图标是 System.Drawing.Icon
,但我必须从 System.Windows.Media.Imaging.BitmapImage $ C $工作C>。
是有没有办法转换的BitmapImage
到图标
?
In my application I have to send a List<MenuItem>
to my shell extension in WCF. These MenuItems are composed of an icon and a label. The type of the icon is System.Drawing.Icon
but I have to work from System.Windows.Media.Imaging.BitmapImage
.
Is there a way to convert BitmapImage
to Icon
?
推荐答案
我的想法:
首先comvert的BitmapImage为位图
First comvert BitmapImage to Bitmap
然后另存为图标
的 http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/4a10d440-707f-48d7-865b-1d8804faf649 /
希望这有助于!
这篇关于我怎么能转换为的BitmapImage图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文