(Note: I completely rewrote this post on 18th March 2010 to bring it all up to date.)
Back with the release of Windows Vista, Microsoft introduced the concept of preview handlers. These let you preview all different file types from within Windows Explorer. Even better, they are both extensible (so you can add more types) and they work in Office too.
To make them more developer friendly, I developed a set of preview handlers for file types commonly used by developers.
The pack works with:
- Windows Vista
- Windows 7
- Outlook 2007
- Outlook 2010
The pack adds support for:
Diff (.diff, .patch)
DOS (.bat, .cmd)
Ruby (.rb, .rhtml, .rjs) thanks to Ivan Porto Carrero
The project is basically just a stitched together set of other people’s work – there wasn’t much left for me to do considering:
- 95% of the interop code came from Stephen Toub’s excelent article ‘View Data Your Way With Our Managed Preview Handler Framework‘
- The code highlighting library used is Lonwas.Highlight written by Thomas Johansen
If you’re interested in contributing your own ideas or adding more file types, just over to the source repository on CodePlex.
Previewing a C# (.cs) file in Vista
Previewing as ASP.NET (.aspx) file in Vista
Previewing a TSQL (.sql) file in Vista