But all what I try in the CEFSettings: I do always get a blank page. What is wrong here?
my app.cs lokks like this:
- Code: Select all
public partial class App : Application
{
public App()
{
Exit += (o, e) =>
{
CefRuntime.Shutdown();
};
}
}
My Window.xaml.cs:
- Code: Select all
public partial class MainWindow : Window
{
public MainWindow()
{
CefRuntime.Load();
var settings = new CefSettings();
settings.SingleProcess = false;
settings.MultiThreadedMessageLoop = true;
settings.LogSeverity = CefLogSeverity.Verbose;
settings.LogFile = "cef.log";
settings.ResourcesDirPath = System.IO.Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetEntryAssembly().CodeBase).LocalPath);
CefRuntime.Initialize(new CefMainArgs(new string[0]), settings, null, IntPtr.Zero);
InitializeComponent();
Loaded += (o, e) =>
{
//CefBrowser.NavigateTo("http://www.google.com");
CefBrowser.NavigateTo("chrome://version/");
};
}
}
And the window.xaml
- Code: Select all
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:Xilium.CefGlue.WPF;assembly=Xilium.CefGlue.WPF"
x:Class="WpfEvals.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid >
<wpf:WpfCefBrowser Name="CefBrowser" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</Grid>
</Window>
Thats it. Environment: VS2013, Windows 8.1 x64. Project Platform Targets x86 (or I get a "bad Image exception" for AnyCPU/x64)
Thanks, Torsten