Image (?) File(?) Metadata(?) Properties(?) - wpf

Sorry for the question marks, but a simple (I think) question has an impossible solution.
From file system, if I click on an image file "Properties | Details tab" I access to many metadata.
I need to access from a WPF application to the Description properties (Title, Subject, Rating, Tag and Comment). In particular Tag.
I have found a lot of articles, many are very old. A few in WPF and Imaging library. But no one access to that properties. So the question marks: are these properties on image? On file system? I think they are on the image..I don0t undestand where are these properties and why is so difficult to access...
Can someone help me?
Thanks in advance,
Marco Parenzan

You are referring to EXIF or Exchangeable Image File format data.
http://www.exif.org
http://en.wikipedia.org/wiki/Exchangeable_image_file_format
Yes, there is code to allow accessing this. I would strongly suggest using an existing library over rolling you own with .net framework methods. Plainly put, they suck, are poorly documented and will result in bald spots on your head where there should be none.
See here for more info.

I think you are refering to the EXIF metadata
here is how to access it from an image object in .NET

The best tool I found to read metadata is ExifTool by Phil Harvey at http://www.sno.phy.queensu.ca/~phil/exiftool. The tool is written in Perl, but there is no need to install Perl. The tool has a complete command line syntax for anything you want to do. You can read nearly everything and write most things.

Related

How to change core functionality on DotNetNuke 7

I search this question on uncle google, and in this site, but didn't find a explicit answer.
Can you guys teach me how to make an extension point from an existing core functionality on dotnetnuke7?
For example, I want to change the default behaviour of the "add new page" functionality, implementing different permissions according to user's profile.
Sorry for any English mistake, thanks.
DNN is open source meaning you can download the source code and check under the hood how things are done. Then you can make a module that has a custom implementation of what you want to do. Every good module developer always has a copy of the source code for reference. Otherwise you are asking someone to do the work for you. Good luck

How are you integrating help into your WPF application. Any recommendations?

The question says it all really. If you are writing a WPF application, how are you integrating the application help? What is the state of play in mid-2013?
It seems that there is no clear answer to this from an afternoon with a search engine, but several options:
Write your own fancy tooltip based help (but where are you getting your data from?)
Use .CHM files and the Windows Forms help system (seems archaic to me).
Use Microsoft Help Viewer 1.X or Microsoft Help 2.0.
There is some confusion as to which is more recent / approved of by MS. It appear Help Viewer 1.X might be the recommended option over Microsoft Help 2.0. It doesn't help that the names are so similar...
What is the status of 2.0? Should we use it? Was it ever fully deployed?
Use a third-party product to author your help files and link to them somehow - DocToHelp/NetHelp, NetAdvantage on-line help, etc...
Furthermore, what XAML based mark-up / attributes are you using to provide the necessary context? What is the recommended method?
It seems surprising there is no clear path for supporting application based help in WPF.
My current preference is to use a third party help authorizing system to generate HTML based help.
We then use a WebBrowser to display this help as needed. The authoring system we use makes it fairly easy to extract out a single page from the main help (each "topic" is a single HTML file, and can be included with full contents or not as desired).
Granted, this definitely felt like a bit of a nasty hack at first - but once we wrote the basic plumbing (some attached properties for xaml to specify attributes for context location and add behavior to trigger help, etc), it's fairly clean.
One very nice advantage to this approach, however, is a single help system build works perfectly in all contexts - we can include the documentation online, expose it locally for use in a browser, and use it with context from within our application directly.

Is there a tool for helping the extraction of localizable text from Xaml?

I am tasked with the localization of a Windows Phone 7 application. The first step is to replace the actual visible text with an ID and put the ID and the text in a resource file.
This is a very tedious work and I was wondering if there are tools for this to automate?
I am thinking along the lines of the gettext package and .po files used in the linux world.
Here is a codeplex project that may help you some. http://xlocalization.codeplex.com/. To use this method, each control that is to be localized must have the name property assigned.
I tried it with my existing project, and got results that were mixed, but in the long run, I decided to do it by hand. I don't remember specifically what the problems were that I had, but if you want to try it on a copy of your project, it won't take much time. If it works for you (and if your controls to be localized all have names), it could save you time.
Also, I don't know how familiar you are with localizing, but I wrote a blog on the subject that takes you from start to finish. It's at http://www.hopnet.mobi, click Blogs.
Hope this helps.
I know this will get a lot of traditional answers, but I would also like to put forward something completely original we tried (and succeeded) doing ourselves for more efficient localisation of Silverlight using Attached Properties instead of binding:
Localisation of Silverlight projects after completion
To pre-populate the database we wrote a XML parser to find our markers in all our project's XAML files (XAML is just a subset of XML after all). We could not find any existing tools to do what you suggested, but our requirements were simplified by our new method of localisation (no resource files and no horrid bindings).
(yes, this is almost the same answer as a previous one of mine today, but it seems to fit again).
Also for future reference keep an eye out for this tool: http://www.neovelop.com/ This tool will go in private beta soon and looks very promising. Judging from their preview movie this will do exactly what you asked for.

Resource files not loaded properly in the silverlight client

I have a SL 4.0 application hosted on IIS with a possibility to change GUI language. The problem is that hosted on one machine , language functionality works and on the other machine not. Inside this piece of code:
Thread.CurrentThread.CurrentCulture = new CultureInfo(message.NewCulture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(message.NewCulture);
on Windows7 it does update UICulture with correct resource file and on Windows Server 2008 it does not. IIS settings on both systems seem to be the same. Any suggestions where to look?
You might want to take a look at the Blog entry made by Tim Heuer on the subject.
http://timheuer.com/blog/archive/2009/08/26/silverlight-string-localization.aspx
Using this blog post, I was able to get Globalization/Localization implemented in a short amount of time and minimal effort.
It sounds like you need to take a look at the Access Modifier section in the designer. You'll need to set this to Public in order to use it in XAML binding. Also check that all the RESX files are marked as Embedded Resource in the properties for the files.
Additionally make sure your string resource dictionaries have extensions to something similar:
P.S. I hope you'll read Tim's blog entry, he goes into a lot more detail than what I've explained. Also from my personal experience, I wasn't able to dynamically reload the language on the fly until I took a look the section on the blog post titled "Public modifier workaround and dynamically setting the culture".
R-Click the assembly(ies) containing your localized files, select unload project and then edit the project file(s). The project files are in XML format. Look for a XML tag related to SupportedCultures (or something like that). Make sure that your cultures are in the list.
Localization didn't want to kick in for me until I got that resolved.

PowerPoint and WPF

I really need a way of loading a .ppt document in my wpf application. Can anyone give me a hint, code sample?
Checkout the following discussion thread. Also Dr.WPF got an interesting article that might help you as well: Hosting Office in WPF Application
However consider license costs will be quite high for your scenario...
According to this artice the DSO Framer is no longer supported. Have to look for something else.
You may need to elaborate a bit more on your particular need to get a practical answer.
I don't think hosting PowerPoint (ppt) is a good option because it requires ppt to be installed on the target machine.... and if the target machine has ppt then you can use its API to save the document as HTML and open it in a WebBrowser control.
If the target machine doesn't have powerpoint you may look into some online file conversion service and try hooking up there to convert to HTML and still use WebBrowser control.
I definitely don't recommend wasting your time with DSOFramer - it's very unstable at best and it will just feel like you're one step away from making it work for a while but it doesn't work.
Another option is of course to write your own parser for ppt files, the OfficeOpenXML version of the files is definitely "parseable". I've done that for Word docx and it's relatively easy to get the course data out of the document - say shapes, text... - but the devil there is in the details. There are a zillion little features to implement.

Resources