There are times when I want to preview file content in Windows Explorer. The Preview pane in Explorer makes this a simple task. Just click the Preview pane button and select the file as shown in Figure 1 and Figure 2.
Figure 1: The preview pane button.
Figure 2: Viewing a .txt file.
In this example I am previewing a .txt file. Use the Ctrl + mouse wheel to change the zoom level on the text. Also, ALT+P toggles the preview pane.
Adding your own extensions
Making a simple registry edit allows you to see other files, like .csproj and .xaml, in the preview pane.
Here’s how I did the XAML extension (see Figure 3).
- Open the HKEY_CLASSES_ROOT\.xaml key in Regedit.
- Add a string key named PerceivedType.
- Set the value of the PerceivedType key to ‘text’.
Figure 3: Adding a registry key.
Now you can preview the content.
Figure 4: Viewing the .xaml file

[...] Customize the Windows 7 Preview Pane for XAML Files (Walt Ritscher) [...]
Very cool. Any reason that does not work with all file types? I thought if you can do for XAML then why not .vb files. When I opened the .vb file extension in regedit it already has the PerceivedType key set to “text”. The preview tab will not show the contents saying “No Preview Available”
No, it should work. On my computer, the .cs extension works this way. But I just checked and .vb doesn’t work on mine. I also setup .vbproj and doesn’t show either. Time for some more research.
[...] Preview pane for XAML files [...]