File loader in wpf - wpf

Is there any file loader control in WPF which allows importing files during the runtime?
(choosing any file from the file system).

Are you looking for something like the OpenFileDialog? If so, there are examples of how to use it here or here or you can google "wpf openfiledialog" and find many others.

The Windows Forms OpenFileDialog controls are still available for WPF apps:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/aa21c4b6-aa44-44e0-82c9-6e29d9e3c2e3/
I have mostly seen apps using the win forms dialog or an updated win forms one. For example:
http://gong-shell.sourceforge.net/
As a side note, the silverlight file upload picker for SharePoint 2010 looks pretty good it would be good if MS released that to the wild. :)

Related

Using AdControl to display ads in a WPF application packaged for UWP

I (appear to) have successfully created a UWP package for my WPF application using the following guide:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
Now I would like to take advantage of the AdControl class to display banner ads in my project, as detailed here:
https://learn.microsoft.com/en-us/windows/uwp/monetize/adcontrol-in-xaml-and--net
Is this possible? I don't see the "Universal Windows" section under References for my WPF project, which I can guess is because it’s not an original Universal Windows project. I do see it under References for the UWP package wrapper project I created using the guide above, but that doesn't help me show ads in the WPF project.
Any help appreciated.
You can add Universal Windows reference and use the API in your project as described here but you cannot use AdControl since XAML/UI in WPF is not the same as XAML in UWP and the AdControl is a UWP XAML control:
As mentioned above, there are exceptions to the rule that Windows 10
APIs are accessible from PC software. The first big exception concerns
XAML UI APIs. The XAML framework in UWP is different from the one in
WPF and you really don’t want to be mixing them up, anyways.

create application like simple PowerPoint in c# wpf?

I want to create create application like simple PowerPoint in c# WPF, I meant exactly that I want to create page like slides and can arrange in time line with various speed and transition and can seeing in preview panel.I tries on Microsoft PowerPoint interoperability but as I found It just create PowerPoint file not provide framework to interact!!.
Please show me sample code or sample way to-do or how do it?
One method I have used is to have a WPF WebBrowser control and then navigate to a pptx file. This will open PowerPoint inside the WebBrowser control. You will not be able to interact with the PowerPoint application from your WPF host, but that is about as good as it gets.
Try this control from syncfusion: http://www.syncfusion.com/products/file-formats/presentation. They now offer a free community version with all if their controls.

Loading a WPF form into a MFC application without /clr

I am trying to integrate WPF into a legacy MFC application. I am unable to include the /clr switch to mix managed and unmanaged due to the restrictions of other projects in the solution. I need the WPF window open up as a child window in the main MFC application. I have been investigating different ways for the past two weeks but have hit roadblock with every implementation try. If anyone has successfully integrated this type of implementation, I would appreciate some direction. I have been able to integrate with a Win32 app, but could not translate this to an MFC app. Thanks everyone.
I believe that WPF requires .NET, therefore what you need is to create a separate DLL or EXE for the WPF parts. hat new project could be the container for .NET code and your main MFC would launch this separate project.
You can write a WPF front end that launches C++ apps with the desired command like switches, similar to what Visual Studio 2010 is doing to compile your code and show the results in the output pane. In this way you can avoid having to hack message loop code to support both frameworks .
You may show your Dialog using a COM interface

Host excel file in wpf application

I am having one excel file that i need to host or embed in wpf application. that file need to open inside wpf application.. and user can do modification into that.
is there any solution for this....
Thanks
Brijesh
I am looking for hosting microsoft excel in my WPF application. Searching on internet for some time , i got below answer.
hosting stand alone office in WPF application

Does WPF support reading/writing WMF/EMF files natively?

Can Windows Presentation Foundation read/write WMF/EMF files without having to use WinForms Interop or Win32.
If it does not, what is the reason?
A quick search on MSDN reveals a thread containing a post by Peggi Goodwin, a PM at Microsoft:
WPF does not support the EMF and WMF image formats. These formats are more susceptible to security vulnerabilities than other image formats, so we do not intend to support them.
I did it !!!
I'm using ComponentOne's WPF chart in my real code but to keep the example simple I just did a button. But it DOES work on Complex wpf widgets. Fonts, Transparency, AntiAlias etc. everything works. And I can paste into Word and change labels on charts etc.
Basically I decimate the XAML to XPS then import it back into XAML.
Then I used an open source project that converts XAML to WMF called XAMLToys.
XAMLToys would fail 99% of the time because you cannot serial complex XAML objects
http://softronix.com/download/WpfToWmfClipboard.zip
Big kudos to these two projects
http://xamltoys.codeplex.com/
http://khason.net/blog/converting-fixeddocument-xpsdocument-too-to-flowdocument/

Resources