Is there a way to override the icon and/or preview of a specific file format (my own) in Windows Explorer using C#? My files are xml files that contain a base-64 image, I'd like to display this image in Explorer as the file icon.
+2
A:
You need to implement a thumbnail shell extension. There's an older MSDN article that addresses writing shell extensions in general (though it doesn't specifically address thumbnail shell extensions).
Note that this was not possible pre-.NET 4.0 (hence the editor's note on the MSDN article). I originally thought that you would have to target .NET 4.0 for it to work, but according to Peter Ritchie's blog post on the subject, you could target any version (.NET 4.0 just has to be installed).
Stephen Cleary
2010-07-17 13:08:17