How do I extract Icons embedded into a .exe using WPF?
Given a folder full of .exe files, I need to build a toolbar that displays each .exe file's embedded icon. I've seen solutions u开发者_C百科sing WinForms ( Get program icons ) , but how can I do this using WPF?
Also, due to the nature of the task, it needs to be done dynamically using C#, not with Xaml.
I appreciate any help!
The answer in that post is about WPF. It returns an ImageSource. WPF's Image class handles that just fine using the Source property.
someImage.Source = GetIcon(somePath); // See http://stackoverflow.com/questions/6008600/get-program-icons
精彩评论