Hi,
I tried to use cefglue.sample.wpfOsr and it worked fine, now i'm trying to create a wpfcefBrowser each time a user click on a button.
At the beginning of the constructor of my mainWindow i had this :
" CefRuntime.Load();
var mainArgs = new CefMainArgs(new string[] { });
var app = new SampleCefApp();
var exitCode = CefRuntime.ExecuteProcess(mainArgs, app);
if (exitCode != -1)
return; // FMT: throw exception??
CefSettings cefSettings = new CefSettings
{
SingleProcess = false,
MultiThreadedMessageLoop = true,
LogSeverity = CefLogSeverity.Verbose,
LogFile = "cef.log",
};
CefRuntime.Initialize(mainArgs, cefSettings, app); "
where SampleCefApp looks like this :
" class SampleCefApp : CefApp
{
public SampleCefApp()
{
}
}"
and when the user click on the button in order to create a new browser, the constructor of my class browserWindow is called :
"
public WpfCefBrowser webview;
public BrowserWindow()
{
webview = new WpfCefBrowser();
webview.StartUrl = "
http://www.google.com";
initializeWindow(webview, 550, 500, 0, 0, 20, 20);
MainWindow.Current.mainGrid.Children.Add(webview);
}
public void initializeWindow(WpfCefBrowser webview,int height,int width,int left,int top,int right,int bottom)
{
webview.Height = height;
webview.Width = width;
webview.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;
webview.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
webview.Margin = new System.Windows.Thickness(left, top, right,bottom);
}
"
But nothing happen on my app, and no error message...any idea?