How can I make a Windows Explorer file preview screen in WPF? - wpf

I'm working on an application that will have attachments, and I would like to create a type of display like in windows Explorer, where you choose a "Details" view, and also show the preview pane.
I would like to be able to show a thumbnail view of the attached file currently selected, based on the file extension.
Does anyone know where I can start to look for examples on how to pull this off?
I know Outlook 2007 can also do something similar using preview handlers. I think that’s going to be the direction I want to go in, but I'm not sure where to start.
Many thanks.
All Hail the Glory of the Hypnotoad!

While you could do it in WPF, you should not do it.
Seriously: don't do it! - you would break many apps (including one of mine).
To do this without .NET, see here for a nice guide.

I think you can start here
http://blogs.microsoft.co.il/blogs/eyal/archive/2007/07/29/Hosting-vista_2F00_office-2007-previewers-in-winform-application.aspx
(the code is partially black on black, at least for me, but you can disable the styles or just copy it)

Related

INSTALLSHIELD setup User may search for their personal or business logo and apply

Every windows screen in our WPF application displays the ICON in the upper left corner. Numerous users of this program have the expectation of seeing their company logo.
We made the logo.ico file a "always copy" so that it is copied into the bin location along with every build. ICON is referring to the logo.ico file in this case.
The logo.ico file's icon will be reflected on the Windows screen if we go ahead and replace it with any other image.
We cannot expect the customers to accomplish this, so we must make it easier for them to browse the icon file during installation. InstalledShield software is used to prepare the installation setup. If there is a better way, please describe it here. I seek advice on how to accomplish this.
I would like you to check why the icon is getting reflected if you replace it with any other image, windows has some specification on the image size to display the icon/tile on the screen. See whether your icon is meeting all those specification to reflect it on the screen.
https://docs.revenera.com/installshield26helplib/helplibrary/IHelpMarsShortcutProperties.htm#ref-views_3737199233_1323863
you can also find information regarding the icon specification from the Microsoft documentation pages.
Apart from that, if you want to show up a browse dialog during the installation then you need to modify your InstallShield project:
1- To launch a browse dialog from the Basic MSI project:
https://docs.revenera.com/installshield23helplib/helplibrary/FileOpenDialog-HowTo.htm
2- To launch a browse dialog from an InstallScript project:
https://community.flexera.com/t5/InstallShield-Knowledge-Base/Displaying-a-File-Browse-Dialog-in-an-InstallScript-Project/ta-p/3964
But, my preference to you to check why the icon is getting reflected if its replaced with other image, and fix it.

Making icon for a Windows Form: How to make it show up correctly?

OK, so I have built a Windows Form application. I now want an icon for it. So I use the Icon Editor built into Visual Studio 2012. Draw it all out to look nice and purdy. Once I am done, I have a .ico file and I make it the default icon for the project, and also the icon for the one WinForm in the application.
Unfortunately, it does not show up as I have created it! It is displayed as the default icon file as it existed before I modified it in the icon editor. It's a 32x32 4 bit icon. If I change the extension to .bmp it shows up as the default.
It looks like the VS icon editor is editing something else, not the appearance of the icon. Can someone tell me what I am doing wrong?
I used to have a progam called IconArt that would create icons that looked like icons when I used them in VS. IconArt is now abandonware and won't run on my 64bit Windows workstation.
Since I didn't get any answers within the time I was hoping, I posted this question also in the MSDN Visual Studio forum, and got a good answer that I thought I should post here. Credit to Reed Copsey, Jr, for the answer!
This is it:
You'll need to put your design in all of the different versions. ICO
files contain multiple versions of the same image, for different
screen resolutions.
My personal preference is to not use VS - there's an ICO plugin for
Paint.Net (all free) which allows you to make a single image
(typically 256x256), and save multiple versions within an ICO file in
one shot. It's very useful for building icons.
See
http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/
for the plugin.
Since I am a Paint.Net user, the plugin sounded like a great idea, and I tried it. Bingo! This works very nicely.

Is there any way of getting a XAML Editor, either build or download?

In my current project (presentation, slide software) I need to be able to make some simple XAML, text images, movies and stuff like that.
If it were HTML I would go with fckeditor or another free editor, but what to do in XAML?
Anyone know if its possible to make one yourself (like executecommand to a IE)? or download one from anywhre on the net?
Cheers
Take a look at this question: Designing WPF Windows for Free?
The leading answer recommends Kaxaml, XAMLpad and several more options.

Page preferences dialog in WPF

I'm fiddling with adding the ability to output from a program I'm working on to both PDF and XPS. Initially both were just done via printers (pdf printer/xps writer) but I'd like to do it a little more directly.
The issue I've run into is that there doesn't seem to be a page preferences dialog for WPF. Is there one and I just can't find it, or does something like this have to be custom built in WPF?
I can display the print dialog and then just not actually call PrintDialog.Print, but that's not really any better than just having the user print using a PDF printer. I can retrieve all the page settings from the print dialog, but the user would actually be setting those settings for whichever printer was currently selected.
I just need a dialog with all the standard printer preference options, like page size, margins, copies, etc. Not difficult to create, but I'm surprised I can't find one...
My answer to this question should help you. What are the chances... I just answered it, and I stumble across your question :)
Hope this helps you!!

Is a drag-over checkbox list useful?

A while ago I created a drag-over check box list which allows you to check many check boxes in a single gesture. Do you think it is viable and usable on the web where people might not know how to use it. The default behaviour still works for the individual check boxes.
1 - The idea
The idea is nice and can probably be used in professional applications where you have direct contact with users and can explain them how things work, but not necessarily on public websites where users don't want to RTFM and are just looking for familiar behaviours. Unless it was just a sample exercise or a control meant to be included it in a control pack, it violates the YAGNI principle ;)
2 - The implementation
You certainly noticed that the implementation is buggy (at least on IE7 and FF3.1B2). Sometimes, a gesture above all checkboxes will select all of them but one or two. Moving the mouse over the div's above or below the list will stop the drag (I know it's a "feature", but it's not very user friendly). I Checked the source code and to be honnest, while it looks pretty neat, I just didn't want to deal with it because it is plain javascript. Don't you know that...
3 - Possible improvements
...you can write less and do more with a javascript library, typically jQuery. I would completely rewrite this control as a jQuery plugin. It will provide you with a lot of tools to make your code much easier to write, maintain and extend. Just try it, you'll love it. This is from a technical point of view. From a user point of view, try to make you control as familiar as possible, like what Angela suggested, windows explorer : a nice selection rectangle, the ability to use shit + click, or something like that. Finally, remember that for many windows checklistbox users, "selected" and "checked" are two different things.
The demo definitely needs a few enhancements to make it even a little bit useful (although I am not sure if it would be enough):
Allow the dragging to start somewhere that is not a check box.
Allow selection by dragging over the labels as well.
This problem seems similar to the action of selecting multiple files in a file explorer like Windows Explorer. Maybe it can work like the action of selecting multiple files by dragging a rectangle shape around the items to be selected (select one corner, drag to the other corner)? This has the advantage of being similar to an interface element that people may already be familiar with.
For some reason I can't open your link (it says my ip address was blocked). But I think what you're looking for is what I already did in jquery, I uploaded a plugin which I basically ported from crossbrowser.com's dragcheck functionality, it was to be found at http://plugins.jquery.com/project/dragCheck but currently the jquery plugin site is being revamped and my plugin has disappeared. I'm trying to see if they're going to put it back up or if I have to create a new project again...
Anyways until we get that worked out you can see a demo here: http://jsbin.com/ibihi

Resources