CefSharp.Wpf: Open csv, mailto and pdf with Process.Start(…)

148 views
Skip to first unread message

Jaco De Villiers

unread,
Mar 10, 2015, 1:56:02 AM3/10/15
to cefs...@googlegroups.com

Original Question on StackOverflow


I need to handle different content types from f:///. My application renders offline websites in a WPF application. Everything is working except for links to other content files (csv, mailto and pdf).

  • If I register a CefCustomScheme for "mailto", then I get the ProcessRequestAsync and can run the Process.Start(...). However another blank window also popup.
  • If I then add a second CefCustomScheme for "file", then nothing happens. None of the ISchemeHandler ProcessRequestAsync methods are invoked.

I must be able to handle all requests, excluding *.html, in a separate handler

Essentially I just want to replicate the behavior of the MS Web-browser Control. There all I did was point to the entry page (index.htm), and everything loaded. Then if a user clicks any link, the control handled the action and started the correct process (content handler, i.e. Excel for Csv).

Alex Maitland

unread,
Mar 10, 2015, 4:06:58 AM3/10/15
to cefs...@googlegroups.com
Can you fork https://github.com/cefsharp/CefSharp.MinimalExample and provide a reproduction of your problem?

Jaco De Villiers

unread,
Mar 10, 2015, 4:26:09 AM3/10/15
to cefs...@googlegroups.com
Ok, I will try and reproduce and let you know.  Thanks in advance


--
You received this message because you are subscribed to a topic in the Google Groups "CefSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cefsharp/21vTEsPLUeg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.
To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp.
For more options, visit https://groups.google.com/d/optout.

Jaco De Villiers

unread,
Mar 10, 2015, 7:16:58 AM3/10/15
to cefs...@googlegroups.com
Managed to create fork and simulated my problem by adding both browser controls on a single page

Jaco De Villiers

unread,
Mar 10, 2015, 7:18:55 AM3/10/15
to cefs...@googlegroups.com
Create fork (https://github.com/jacodv/CefSharp.MinimalExample).  I simulated the issue by adding two controls on a new startup window
Regards
Jaco

Alex Maitland

unread,
Mar 10, 2015, 8:23:02 AM3/10/15
to cefs...@googlegroups.com
Will take a detailed look when I get a chance.

As a general note I'd reccomend chaning nuget package restore methods, the newer automated method works much better with `CefSharp` (Due to it's extensive use of props files)

http://blog.davidebbo.com/2014/01/the-right-way-to-restore-nuget-packages.html

Jaco De Villiers

unread,
Mar 10, 2015, 8:46:51 AM3/10/15
to cefs...@googlegroups.com
Will do

--
Reply all
Reply to author
Forward
0 new messages