PowerPoint and WPF - 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.

Related

Is there a free WinForms control similar to Telerik's RadDock?

I'm looking to create an interface which has drag-drop-dock functionality like Visual Studio. Telerik offers exactly what I'm looking for:
http://www.telerik.com/products/winforms/dock.aspx
Trouble is, it will cost $1000. This is a side project and I don't have a budget for that. Does anyone know of a similar control which is free and/or open source? Google didn't turn up any results.
Thanks
I ended up going more low-level and using OpenTk GameWindow and GWEN, which contains docking.
GWEN - GUI Without Extravagant Nonsense
https://github.com/garrynewman/GWEN
It's absolutely great, but unfortunately the original project is abandoned. There are a ton of forks at different states. I've personally had a lot of success with it.

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.

Flash vs other methods, and, quick and easy

I have a question about Flash. I am writing my first browser game, and I am trying to decide on a technology.
I have a few requirements:
I don't want to have to pay to write code and a not-complete-crap free IDE would also be good.
I want most (or > 70%) of "normal" computer users to have it installed, so, Unity's pretty much out.
I don't really need performance too much
I need 2D, not 3D
Needs to be able to communicate with the server, and no extra downloads required.
Preferably works with the Facebook platform, but, this isn't a requirment.
Now, I would go with Flash as it fills all of my requirements, but, to my understanding, I need to pay for CS5 to get coding with Flash. Is an alternative around this possible?
Are there any other alternatives I'm missing?
To add onto what ColinE mentioned, FlashDevelop also provides you the ability to download and install the Flex SDK. However, if FlashDevelop as an IDE doesn't work for you, you can also download the Flex SDK yourself.
This is essentially the same thing that's included with Adobe's Flash Builder application, which is basically built on top of Eclipse. This should at least give you a start on creating things in Flash, though you'll be limited to ActionScript 3. I'd suggest sticking with AS3 as it provides a lot of power compared to AS2.
If you do choose to use the Flex SDK, I'll give you a bit of knowledge I've gained since I started using it for developing games. This may be a little long-winded but hopefully it'll answer some of the initial starter questions.
You can develop apps/games using the Flex library but this may increase the size of your SWF file. However, it's worth noting that it's not required to use the library. You can use the compiler (mxmlc) provided in the SDK to build against .as files as well.
From here, there's a few gotchas that might creep in when it comes to assets. Flex provides you the ability to embed assets within your class files. Out of the box, it allows for the embedding of a handful of formats, most notably PNG, TTF, XML and SWF. There's a lot that you'll be able to do with Flex from a code standpoint but it's not very pretty for creating the assets themselves. Primarily, I use the Flash IDE only for cases where a project requires a SWF asset, however, most of my projects tend to use PNG.
When using an embedded SWF asset, you may come across an issue where any code that's included in the asset, such as any hover or animation logic as ActionScript, gets stripped out of the copy embedded in the resulting project's SWF. A workaround for this is forcing the mimetype to "application/octet-stream" and using a Loader object's loadBytes() method.
Finally, you should be able to make some sort of progress provided you have some sort of ActionScript knowledge. There are plenty of resources out there but be aware that a fair amount of them still use AS2. The knowledge can be applied with some modifications but may require some extra legwork to implement. The language is fairly easy to work with.
With all that, I wish you luck. Flash gets a lot of flack these days but even with HTML5 nearing final, there's still a lot of features that it will never be able to touch without leveraging Flash in some way.
Flash, Silervlight or HTML5 will tick pretty much all of those boxes for you, however Silverlight is only installed on ~65% of computers at the moment.
HTML5 can be tough to develop with, so perhaps Flash is your best bet. See the following question which discusses Flash IDEs:
Flash Developer IDE
FlashDevelop is a free development environment for Flash.
I believe your question is about which type of development you should use to get this game going, but I would also urge you to consider the future of each of these software sets, and choose based on what you would like more experience in.
Flash has been holding it's ground pretty well, but I've seen it less and less on major sites these days, and I believe HTML 5 is taking pretty good stabs at it. Even Pandora doesn't use flash anymore, and that was a pretty well designed little flash app (they still use AIR for Pandora One, but not their main site). Instead, like many other websites, it's using HTML and JavaScript.
So, while flash is slowly losing ground to HTML and JavaScript, where does Silverlight stand? Microsoft is still pushing their Silverlight technology, and based on Microsoft's support scheme, they'll still be using it for the next few years at least. At the same time, it's based on the .NET framework, so you'll be gaining some valuable WPF and .NET skills by using Silverlight.
There is no right or wrong decision here, it's really just based on which technology you see yourself using past this product, and which technology you want to learn.
I'd give it a shot in Silverlight, myself, but that's simply because I dislike flash, and there's already too many HTML and JavaScript developers.
edit:
Silverlight is a relatively small 30 second install. I generally hate installing new plugins, but Silverlight is relatively painless, imo.

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.

using silverlight for user interface only

I am planning to make a web application, using silverlight for frontend. requirement is: this frontend will be just an empty shell, and it must be language independent. it will get everything it needs to display and use from server, therefore making it language independent.
i tried to find tutorials, but there is nothing.
as far as i understand, silverlight uses xaml for all its data, so just generating it with whatever language i want shouldn't be a problem. but i don't have any silverlight experience or knowledge, so i'm not sure what is the best way to do this. for example, i don't know how will new content be generated, and what kind of structure silverlight requires.
can anyone give me some starting points?
Your requirements are rather demanding. If i can summarise:
silverlight will be the front end (or container)
you don't know what it will be showing
the content may be dynamically generated
everything, including the visual content, will be retrieved from the server
If i have misunderstood then by all means correct me or adjust your question.
Those requirements are not trivial, especially when you have no prior experience in Silverlight. Fetching data from the server is a normal behaviour in Silverlight, but fetching any generated UI content will be a slow and inefficient use of the technology platform. Silverlight is delivered via the browser, and runs on the client. If you are going to have generated UI, then you may want to consider using straight HTML instead (you can generate the contents using ASP.Net or a scripting language such as PHP). Alternatively, you can generate your required UI views from within the Silverlight app itself by either swapping in and out the appropriate pre-built piece of UI (or controls), programmatically adding new controls into the visual tree, or by loading XAML using the XamlReader class.
This answer may or may not help you much, but like i said before - put some more specific details into your question and you will get more specific answers (either add comments under your question, or post a new more specific question if you cannot edit your current one).
Edit: i have just come across this blog article from Jeff Prosise explaining the use of the INavigationContentLoader interface in Silverlight 4 to dynamically load pages from either remotely or locally. It is a detailed write-up, with a lot of code samples, it may be of use to you.
I would suggest you start at http://Silverlight.net
The "Learn" section has lots of videos that can get you started. http://www.silverlight.net/learn/

Resources