2

I need WPF CefSharp ChromiumWebBrowser to save cookies. I've found similar question but for Winforms here. The problem is that Cef.Initialize() is called in ChromiumWebBrowser so I don't have access to it.

How this can be done in wpf cef sharp?

Community
  • 1
  • 1
aderesh
  • 927
  • 10
  • 22

1 Answers1

3

Yes, you just need to do this earlier in App.xaml.cs like in this example:

https://github.com/cefsharp/CefSharp.MinimalExample/blob/master/CefSharp.MinimalExample.Wpf/App.xaml.cs

Yoshi
  • 3,325
  • 1
  • 19
  • 24
  • For clarity, the `Cef.Initialize()` call in the `ChromiumWebBrowser` constructor is there as a fallback, if you make the call yourself it will be ignored. A slightly more detailed example can be found at https://github.com/cefsharp/CefSharp/blob/cefsharp/41/CefSharp.Example/CefExample.cs#L82 – amaitland Jun 12 '15 at 00:56