0

I installed Cef via Nu-get package manager and configured my project step by step like it was said here. The app starts, all seems fine, but when I actually try to open up a page, it shows a moment of loading, then eventually does nothing. The code I used was this:

var targetGrid = (parent as BrowseWares).ViewerGrid;
CefSettings settings = new CefSettings();
settings.CefCommandLineArgs.Add("enable-gpu", "1");
settings.CefCommandLineArgs.Add("enable-webgl", "1");
Cef.Initialize(settings);
var chromeBrowser = new ChromiumWebBrowser();
chromeBrowser.HorizontalAlignment = HorizontalAlignment.Stretch;
chromeBrowser.VerticalAlignment = VerticalAlignment.Stretch;
chromeBrowser.Load("https://get.webgl.org/");
targetGrid.Children.Add(chromeBrowser);

Let me add that yes the button works, was tested before. I added the HorizontalAlignment and the vertical one in case it would show up but too small to be visible, but to no avail. Could someone show me how to make this work? No errors, no exceptions, it just doesn't show up.

agiro
  • 2,018
  • 2
  • 30
  • 62

1 Answers1

1

All I needed was

chromeBrowser.Address = "http://get.webgl.org/";

instead of the Load.

agiro
  • 2,018
  • 2
  • 30
  • 62