Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs
Contact   •   Articles   •   Products   •   Support   •   Search
Ad-free experience sponsored by:
ASPOSE - the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more

No Preview Images in File Open Dialogs on Windows 7


:P
On this page:

I’ve been updating some file uploader code in my photoalbum today and while I was working with the uploader I noticed that the File Open dialog using Silverlight that handles the file selections didn’t allow me to ever see an image preview for image files. It sure would be nice if I could preview the images I’m about to upload before selecting them from a list. Here’s what my list looked like:

FileOPenDialog

This is the Medium Icon view, but regardless of the views available including Content view only icons are showing up.

Silverlight uses the standard Windows File Open Dialog so it uses all the same settings that apply to Explorer when displaying content. It turns out that the Customization options in particular are the problem here. Specifically the Always show icons, never thumbnails option:

FolderOptions

I had this option checked initially, because it’s one of the defenses against runaway random Explorer views that never stay set at my preferences. Alas, while this setting affects Explorer views apparently it also affects all dialog based views in the same way. Unchecking the option above brings back full thumbnailing for all content and icon views. Here’s the same Medium Icon view after turning the option off:

FileOpenDialogPics

which obviously works a whole lot better for selection of images.

The bummer of this is that it’s not controllable at the dialog level – at least not in Silverlight. Dialogs obviously have different requirements than what you see in Explorer so the global configuration is a bit extreme especially when there are no overrides on the dialog interface. Certainly for Silverlight the ability to have previews is a key feature for many applications since it will be dealing with lots of media content most likely.

Hope this helps somebody out. Thanks to Tim Heuer who helped me track this down on Twitter.

Posted in Silverlight  Windows  

The Voices of Reason


 

Richard
March 11, 2010

# re: No Preview Images in File Open Dialogs on Windows 7

Have you seen the runaway random Explorer views in Windows 7? I used to get them all the time in Vista, but on the two machines I've upgraded to 7 and the one clean install, I haven't seen this problem once.

Rick Strahl
March 11, 2010

# re: No Preview Images in File Open Dialogs on Windows 7

Yeah still see them at times, although not that often. Then again I'm hardly ever using Explorer any more - xPlorer2 is so much better than fighting Explorer :-}

Alex Ilyin
May 09, 2010

# re: No Preview Images in File Open Dialogs on Windows 7

Just wanted to tell Thanks for sharing the trick

Panos
September 11, 2010

# re: No Preview Images in File Open Dialogs on Windows 7

Thanx A LOT man! I was very frustrated about this! FINALLY i can select my pictures without having to open them one by one!:)

Francesca
March 11, 2011

# re: No Preview Images in File Open Dialogs on Windows 7

This very useful post made my day! I had been trying to get a preview of my pictures for so long now... and here I ran into this nicely organized post that solved my problem. Thank you so much Rick & Tim!
 

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2019